[svn] commit: r527 - /branches/parkinglot/src/lib/config/python/bind-cfgd.py

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Jan 26 21:55:00 UTC 2010


Author: jelte
Date: Tue Jan 26 21:55:00 2010
New Revision: 527

Log:
merged back branches/jelte_datasource1 branch

Modified:
    branches/parkinglot/src/lib/config/python/bind-cfgd.py

Modified: branches/parkinglot/src/lib/config/python/bind-cfgd.py
==============================================================================
--- branches/parkinglot/src/lib/config/python/bind-cfgd.py (original)
+++ branches/parkinglot/src/lib/config/python/bind-cfgd.py Tue Jan 26 21:55:00 2010
@@ -130,18 +130,21 @@
                         print(conf_part)
                         # send out changed info
                         self.cc.group_sendmsg({ "config_update": conf_part }, cmd[1])
+                        self.write_config()
                         answer["result"] = [ 0 ]
                     elif len(cmd) == 2:
                         print("[XX bind-cfgd] old config:")
                         print(self.config.data)
                         print("[XX bind-cfgd] updating with:")
                         print(cmd[1])
+                        # TODO: ask module to check the config first...
                         data.merge(self.config.data, cmd[1])
                         print("[XX bind-cfgd] new config:")
                         print(self.config.data)
                         # send out changed info
                         for module in self.config.data:
                             self.cc.group_sendmsg({ "config_update": self.config.data[module] }, module)
+                        self.write_config()
                         answer["result"] = [ 0 ]
                     else:
                         answer["result"] = [ 1, "Wrong number of arguments" ]
@@ -198,7 +201,6 @@
         cm.read_config()
         cm.notify_boss()
         cm.run()
-        cm.write_config()
     except ISC.CC.SessionError as se:
         print("[bind-cfgd] Error creating config manager, "
               "is the command channel daemon running?")




More information about the bind10-changes mailing list