summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2018-02-14 23:14:54 +0530
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-20 22:58:29 +0000
commit2939f18e38d4f627a80b1f513ddb1fc717ddb566 (patch)
tree7fecd8406b52d9de43a370dd8f7e455ecd75cda4
parente8fca1d5c14f3b665bcfe65de629d3a01f16f274 (diff)
downloadphosphor-networkd-2939f18e38d4f627a80b1f513ddb1fc717ddb566.tar.gz
phosphor-networkd-2939f18e38d4f627a80b1f513ddb1fc717ddb566.zip
NetworkManager: Remove the create Dbus objects function
When the network manager comes up it creates the network Dbus objects,With the recent change we start writing the network configuration file,which doesn't create the network objects immediately rather it waits for a time window, when the timer gets expired,It creates the objects. so it introduces a window where other application which is waiting for a D-Bus object,gets the notification that object exist but during accessing of object that object doesn't exist due to network timer got expired and it is recreating the network objects. It is kind of race condition. Resolves openbmc/openbmc#2897 Change-Id: I4d557d21940ec3f149426a26cf6363010c422dd7 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
-rw-r--r--network_manager_main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/network_manager_main.cpp b/network_manager_main.cpp
index d13a857..62d12af 100644
--- a/network_manager_main.cpp
+++ b/network_manager_main.cpp
@@ -110,9 +110,6 @@ int main(int argc, char *argv[])
OBJ_NETWORK,
NETWORK_CONF_DIR);
- // create the network interface dbus objects and system config
- phosphor::network::manager->createChildObjects();
-
// create the default network files if the network file
// is not there for any interface.
// Parameter false means don't create the network
@@ -129,6 +126,8 @@ int main(int argc, char *argv[])
// this will add the additional fixes which is needed
// in the existing network file.
phosphor::network::manager->writeToConfigurationFile();
+ // whenever the configuration file gets written it restart
+ // the network which creates the network objects
}
//RtnetLink socket
OpenPOWER on IntegriCloud