Merge remote-tracking branch 'origin/pr/242'
This commit is contained in:
commit
c223d223bd
2 changed files with 15 additions and 4 deletions
|
@ -75,7 +75,13 @@
|
|||
#define CW_DUMP(buf, len, format, ...) \
|
||||
printf(format, __VA_ARGS__); int j; for (j = 0; j < len; ++j) printf("%02X ", buf[j]); printf("\n");
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <features.h>
|
||||
#if __GNUC_PREREQ(4, 3)
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MAX_CA 4
|
||||
#define MAX_INDEX 64
|
||||
#define KEY_SIZE 8
|
||||
|
|
13
src/main.c
13
src/main.c
|
@ -389,14 +389,14 @@ main(int argc, char **argv)
|
|||
{ 'u', "user", "Run as user", OPT_STR, &opt_user },
|
||||
{ 'g', "group", "Run as group", OPT_STR, &opt_group },
|
||||
{ 'p', "pid", "Alternate pid path", OPT_STR, &opt_pidpath },
|
||||
{ 'C', "firstrun", "If no useraccount exist then create one with\n"
|
||||
{ 'C', "firstrun", "If no user account exists then create one with\n"
|
||||
"no username and no password. Use with care as\n"
|
||||
"it will allow world-wide administrative access\n"
|
||||
"to your Tvheadend installation until you edit\n"
|
||||
"the access-control from within the Tvheadend UI",
|
||||
OPT_BOOL, &opt_firstrun },
|
||||
#if ENABLE_LINUXDVB
|
||||
{ 'a', "adapters", "Use only specified DVB adapters",
|
||||
{ 'a', "adapters", "Only use specified DVB adapters (comma separated)",
|
||||
OPT_STR, &opt_dvb_adapters },
|
||||
#endif
|
||||
{ 0, NULL, "Server Connectivity", OPT_BOOL, NULL },
|
||||
|
@ -475,13 +475,16 @@ main(int argc, char **argv)
|
|||
if (!opt_dvb_adapters) {
|
||||
adapter_mask = ~0;
|
||||
} else {
|
||||
char *p, *r, *e;
|
||||
char *p, *e;
|
||||
char *r = NULL;
|
||||
char *dvb_adapters = strdup(opt_dvb_adapters);
|
||||
adapter_mask = 0x0;
|
||||
p = strtok_r((char*)opt_dvb_adapters, ",", &r);
|
||||
p = strtok_r(dvb_adapters, ",", &r);
|
||||
while (p) {
|
||||
int a = strtol(p, &e, 10);
|
||||
if (*e != 0 || a < 0 || a > 31) {
|
||||
tvhlog(LOG_ERR, "START", "Invalid adapter number '%s'", p);
|
||||
free(dvb_adapters);
|
||||
return 1;
|
||||
}
|
||||
adapter_mask |= (1 << a);
|
||||
|
@ -489,8 +492,10 @@ main(int argc, char **argv)
|
|||
}
|
||||
if (!adapter_mask) {
|
||||
tvhlog(LOG_ERR, "START", "No adapters specified!");
|
||||
free(dvb_adapters);
|
||||
return 1;
|
||||
}
|
||||
free(dvb_adapters);
|
||||
}
|
||||
#endif
|
||||
if (tvheadend_webroot) {
|
||||
|
|
Loading…
Add table
Reference in a new issue