Skip to content

Commit 552885f

Browse files
authored
Merge pull request #179 from richiMarchi/fix_polycubed_persistency
fix pr/save_load_topology bug
2 parents cd28981 + 8bfbf94 commit 552885f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/polycubed/src/config.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ bool Config::load(int argc, char *argv[]) {
508508
}
509509

510510
load_from_file(configfile);
511+
cubes_dump_file_flag = false;
511512
load_from_cli(argc, argv);
512513
check();
513514

src/polycubed/src/polycubed.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,13 @@ int main(int argc, char *argv[]) {
289289
if (config.getCubesDumpEnabled()) {
290290
cubesdump = new CubesDump();
291291
core->set_cubes_dump(cubesdump);
292-
}
293292

294-
// In case the user does not want to initialize the Polycube virtual network,
295-
// let's load the last topology that was present when the daemon was shut down.
296-
if (!config.getCubesDumpCleanInit()) {
297-
restserver->load_last_topology();
298-
}
293+
// In case the user does not want to initialize the Polycube virtual network,
294+
// let's load the last topology that was present when the daemon was shut down.
295+
if (!config.getCubesDumpCleanInit()) {
296+
restserver->load_last_topology();
297+
}
299298

300-
if (config.getCubesDumpEnabled()) {
301299
// start to saving topology only after it has been loaded
302300
cubesdump->Enable();
303301
}

0 commit comments

Comments
 (0)