Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
HTSP: allow to remove language settings
  • Loading branch information
perexg committed May 29, 2015
1 parent 63c7b79 commit ec083c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/htsp_server.c
Expand Up @@ -1080,8 +1080,14 @@ htsp_method_async(htsp_connection_t *htsp, htsmsg_t *in)
htsmsg_get_u32(in, "epg", &epg);
htsmsg_get_s64(in, "lastUpdate", &lastUpdate);
htsmsg_get_s64(in, "epgMaxTime", &epgMaxTime);
if ((lang = htsmsg_get_str(in, "language")))
htsp->htsp_language = strdup(lang);
if ((lang = htsmsg_get_str(in, "language")) != NULL) {
if (lang[0]) {
htsp->htsp_language = strdup(lang);
} else {
free(htsp->htsp_language);
htsp->htsp_language = NULL;
}
}

/* First, just OK the async request */
htsp_reply(htsp, in, htsmsg_create_map());
Expand Down

0 comments on commit ec083c9

Please sign in to comment.