add --eapdir option only if defined in ipsec.conf
authorAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 14 Feb 2007 00:53:45 +0000 (00:53 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 14 Feb 2007 00:53:45 +0000 (00:53 -0000)
src/starter/invokecharon.c

index 29b2412..1fceae7 100644 (file)
@@ -116,8 +116,11 @@ starter_start_charon (starter_config_t *cfg, bool debug)
     {
        arg[argc++] = "--strictcrlpolicy";
     }
-    arg[argc++] = "--eapdir";
-    arg[argc++] = cfg->setup.eapdir;
+    if (cfg->setup.eapdir)
+    {
+       arg[argc++] = "--eapdir";
+       arg[argc++] = cfg->setup.eapdir;
+    }
 
     {   /* parse debug string */
        char *pos, *level, *buf_pos, type[4], buffer[512];