From 9989c36eeed7087c57e3d5e6bc5a0fa990be051a Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sat, 17 Jan 2015 16:47:19 +0200 Subject: [PATCH] Delayed the server parameter parsing. --- satip.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/satip.c b/satip.c index 64a4722..a41e324 100644 --- a/satip.c +++ b/satip.c @@ -100,6 +100,7 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[]) { NULL, no_argument, NULL, 0 } }; + cString server; int c; while ((c = getopt_long(argc, argv, "d:t:s:S", long_options, NULL)) != -1) { switch (c) { @@ -110,7 +111,7 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[]) SatipConfig.SetTraceMode(strtol(optarg, NULL, 0)); break; case 's': - ParseServer(optarg); + server = optarg; break; case 'S': SatipConfig.SetUseSingleModelServers(true); @@ -118,6 +119,9 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[]) default: return false; } + // this must be done after all parameters are parsed + if (!isempty(*server)) + ParseServer(*server); } return true; }