conf: ensure the correct configuration file is stored in the configuration
authorFerry Huberts <ferry.huberts@pelagic.nl>
Sun, 25 Dec 2016 13:30:00 +0000 (14:30 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 4 Jan 2017 08:47:11 +0000 (09:47 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/cfgparser/olsrd_conf.c

index f125f56..7d768f9 100644 (file)
@@ -162,6 +162,10 @@ olsrmain_load_config(char *file) {
     fprintf(stderr, "Error while reading config file %s!\n", file);
     return -1;
   }
+
+  free(olsr_cnf->configuration_file);
+  olsr_cnf->configuration_file = strdup(file);
+
   return 0;
 }