Opened 10 years ago

Closed 10 years ago

#278 closed defect (fixed)

modules that listen to other modules answer to command for those

Reported by: jelte Owned by: jelte
Priority: medium Milestone: 06. 4th Incremental Release
Component: ~Inter-module communication(obsolete) Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: Add Hours to Ticket:
Total Hours: Internal?: no


If a module has live access to the configuration of another one, it also receives their commands. It should ignore those (or at least, not answer them).


Change History (7)

comment:1 Changed 10 years ago by jelte

  • Owner changed from jelte to UnAssigned
  • Status changed from new to reviewing

Committed a fix for both cpp and python versions in branches/trac278 r2416

comment:2 Changed 10 years ago 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                   , new_config)
198                             self._remote_module_configs[module_name].set_local_config(newc)
199                             return
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))

comment:3 Changed 10 years ago by zhanglikun

Seems my question isn't related with the change you did, :)

comment:4 Changed 10 years ago by jelte

unrelated indeed, but to answer your question, we could validate it, but we shouldn't send back an error (that is up to the module whose config it is)

comment:5 Changed 10 years ago by jelte

just a mental note for branches/trac232, reverse r2437 after this has been reviewed and merged.

comment:6 Changed 10 years ago by zhanglikun

  • billable set to 1
  • Internal? unset
  • Owner changed from UnAssigned to jelte

Hi jelte, I have reviewed the patch, it looked well, and I test the patch in my local machine, it works well. Please commit.

comment:7 Changed 10 years ago by jelte

  • Resolution set to fixed
  • Status changed from reviewing to closed


committed in r2506, closing ticket.

Note: See TracTickets for help on using tickets.