mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 11:37:03 +00:00
Fix -t argument
This commit is contained in:
parent
31f9a001b1
commit
8a24ff583f
18
iptv.c
18
iptv.c
@ -79,22 +79,22 @@ bool cPluginIptv::ProcessArgs(int argc, char *argv[])
|
|||||||
debug1("%s", __PRETTY_FUNCTION__);
|
debug1("%s", __PRETTY_FUNCTION__);
|
||||||
// Implement command line argument processing here if applicable.
|
// Implement command line argument processing here if applicable.
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
{ "devices", required_argument, NULL, 'd' },
|
{ "devices", required_argument, NULL, 'd' },
|
||||||
{ "trace", required_argument, NULL, 't' },
|
{ "trace", required_argument, NULL, 't' },
|
||||||
{ NULL, no_argument, NULL, 0 }
|
{ NULL, no_argument, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
while ((c = getopt_long(argc, argv, "d:", long_options, NULL)) != -1) {
|
while ((c = getopt_long(argc, argv, "d:t:", long_options, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'd':
|
case 'd':
|
||||||
deviceCountM = atoi(optarg);
|
deviceCountM = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
IptvConfig.SetTraceMode(strtol(optarg, NULL, 0));
|
IptvConfig.SetTraceMode(atoi(optarg));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user