mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Delayed the server parameter parsing.
This commit is contained in:
parent
d2064f0c04
commit
9989c36eee
6
satip.c
6
satip.c
@ -100,6 +100,7 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
|
|||||||
{ NULL, no_argument, NULL, 0 }
|
{ NULL, no_argument, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cString server;
|
||||||
int c;
|
int c;
|
||||||
while ((c = getopt_long(argc, argv, "d:t:s:S", long_options, NULL)) != -1) {
|
while ((c = getopt_long(argc, argv, "d:t:s:S", long_options, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
@ -110,7 +111,7 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
|
|||||||
SatipConfig.SetTraceMode(strtol(optarg, NULL, 0));
|
SatipConfig.SetTraceMode(strtol(optarg, NULL, 0));
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
ParseServer(optarg);
|
server = optarg;
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
SatipConfig.SetUseSingleModelServers(true);
|
SatipConfig.SetUseSingleModelServers(true);
|
||||||
@ -118,6 +119,9 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
|
|||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// this must be done after all parameters are parsed
|
||||||
|
if (!isempty(*server))
|
||||||
|
ParseServer(*server);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user