BIND 10 #278: modules that listen to other modules answer to command for those
BIND 10 Development
do-not-reply at isc.org
Tue Jul 6 14:38:34 UTC 2010
#278: modules that listen to other modules answer to command for those
----------------------------------------+-----------------------------------
Reporter: jelte | Owner: UnAssigned
Type: defect | Status: reviewing
Priority: major | Milestone: 06. 4th Incremental Release
Component: Inter-module communication | Resolution:
Keywords: | Sensitive: 0
----------------------------------------+-----------------------------------
Comment(by zhanglikun):
Hi Jelte, I see the comment "no checking for validity, that's up to the
module itself", should we do validation first before changing the configs
in remove module? just move the code in line 205 before line 192.
{{{
188 if cmd == COMMAND_CONFIG_UPDATE:
189 new_config = arg
190 # If the target channel was not this module
191 # it might be in the remote_module_configs
192 if module_name != self._module_name:
193 if module_name in self._remote_module_configs:
194 # no checking for validity, that's up to
the
195 # module itself.
196 newc =
self._remote_module_configs[module_name].get_local_config()
197 isc.cc.data.merge(newc, new_config)
198
self._remote_module_configs[module_name].set_local_config(newc)
199 return
200
201 # ok, so apparently this update is for us.
202 errors = []
203 if not self._config_handler:
204 answer = create_answer(2, self._module_name +
" has no config handler")
205 elif not
self.get_module_spec().validate_config(False, new_config, errors):
206 answer = create_answer(1, " ".join(errors))
}}}
--
Ticket URL: <https://bind10.isc.org/ticket/278#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list