1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Fix -t argument

This commit is contained in:
repojohnray 2023-01-13 01:44:37 +01:00
parent 31f9a001b1
commit 8a24ff583f
No known key found for this signature in database
GPG Key ID: 45E288320CD945F1

18
iptv.c
View File

@ -79,22 +79,22 @@ bool cPluginIptv::ProcessArgs(int argc, char *argv[])
debug1("%s", __PRETTY_FUNCTION__);
// Implement command line argument processing here if applicable.
static const struct option long_options[] = {
{ "devices", required_argument, NULL, 'd' },
{ "trace", required_argument, NULL, 't' },
{ NULL, no_argument, NULL, 0 }
{ "devices", required_argument, NULL, 'd' },
{ "trace", required_argument, NULL, 't' },
{ NULL, no_argument, NULL, 0 }
};
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) {
case 'd':
deviceCountM = atoi(optarg);
break;
deviceCountM = atoi(optarg);
break;
case 't':
IptvConfig.SetTraceMode(strtol(optarg, NULL, 0));
break;
IptvConfig.SetTraceMode(atoi(optarg));
break;
default:
return false;
return false;
}
}
return true;