service.tcl: missing "list" in after command
Brought to you by:
apnadkarni
Thanks for great TWAPI.
I noticed the following background error, when running as a windows service:
BGError (::main::bgerror {wrong # args: should be "::twapi::_call_scm_within_waithint name orig_state orig_checkpoint"})
> wrong # args: should be "::twapi::_call_scm_within_waithint name orig_state orig_checkpoint"
> while executing
> "::twapi::_call_scm_within_waithint elmilog el1139 server start_pending 2"
> ("after" script)
> --Traceback--
> INNER:invokeStk1 ::twapi::_call_scm_within_waithint elmilog el1139 server start_pending 2
The reason is a list error in the after command, when the service has a name which is not one list word:
File "service.tcl" line 1043 reads:
after $delay ::twapi::_call_scm_within_waithint $name $current_state $service_state($name,checkpoint)
A solution might be to add a list command:
after $delay [list ::twapi::_call_scm_within_waithint $name $current_state $service_state($name,checkpoint)]
Thanks for all,
Harald
Anonymous
Rookie mistake :-(
Thanks
Fixed now. Please test (from repository) if you have time.
I have tested the proposed list solution in advance., what is identical what is implemented:
https://github.com/apnadkarni/twapi/commit/42bb48fee7110297090d1a10bb35321cd2169a59
This works and spaces in service names are supported by all other commands.
THanks for all and take care,
Harald
Fixed for 5.1.1