Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SAT>IP server: parse correctly more auto values
  • Loading branch information
perexg committed Mar 23, 2015
1 parent 6cd5f1b commit 55281a8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/satip/rtsp.c
Expand Up @@ -659,7 +659,7 @@ pilot_to_tvh(http_connection_t *hc)
return DVB_PILOT_ON;
if (strcmp(s, "off") == 0)
return DVB_PILOT_OFF;
if (s[0] == '\0')
if (s[0] == '\0' || strcmp(s, "auto") == 0)
return DVB_PILOT_AUTO;
return DVB_ROLLOFF_NONE;
}
Expand All @@ -668,12 +668,13 @@ static int
tmode_to_tvh(http_connection_t *hc)
{
static struct strtab tab[] = {
{ "1k", DVB_TRANSMISSION_MODE_1K },
{ "2k", DVB_TRANSMISSION_MODE_2K },
{ "4k", DVB_TRANSMISSION_MODE_4K },
{ "8k", DVB_TRANSMISSION_MODE_8K },
{ "16k", DVB_TRANSMISSION_MODE_16K },
{ "32k", DVB_TRANSMISSION_MODE_32K },
{ "auto", DVB_TRANSMISSION_MODE_AUTO },
{ "1k", DVB_TRANSMISSION_MODE_1K },
{ "2k", DVB_TRANSMISSION_MODE_2K },
{ "4k", DVB_TRANSMISSION_MODE_4K },
{ "8k", DVB_TRANSMISSION_MODE_8K },
{ "16k", DVB_TRANSMISSION_MODE_16K },
{ "32k", DVB_TRANSMISSION_MODE_32K },
};
const char *s = http_arg_get_remove(&hc->hc_req_args, "tmode");
if (s[0]) {
Expand All @@ -687,6 +688,7 @@ static int
mtype_to_tvh(http_connection_t *hc)
{
static struct strtab tab[] = {
{ "auto", DVB_MOD_AUTO },
{ "qpsk", DVB_MOD_QPSK },
{ "8psk", DVB_MOD_PSK_8 },
{ "16qam", DVB_MOD_QAM_16 },
Expand Down

0 comments on commit 55281a8

Please sign in to comment.