Skip to content

Commit 48d4620

Browse files
polycubed: set parent after add cube
The parent is only valid after the add cube function has returned. Signed-off-by: Mauricio Vasquez B <mauriciovasquezbernal@gmail.com>
1 parent 9e21baf commit 48d4620

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/polycubed/src/polycubed_core.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ void PolycubedCore::attach(const std::string &cube_name,
378378
ServiceController::ports_to_ifaces.at(port_name));
379379
}
380380

381-
cube->set_parent(peer.get());
382381
peer->add_cube(cube.get(), position, other);
382+
cube->set_parent(peer.get());
383383
}
384384

385385
void PolycubedCore::detach(const std::string &cube_name,

0 commit comments

Comments
 (0)