Menu

#223 service.tcl: missing "list" in after command

Unscheduled
closed
None
Bug
5
2025-08-16
2025-07-28
No

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

Discussion

  • Ashok P. Nadkarni

    Rookie mistake :-(

    Thanks

     
  • Ashok P. Nadkarni

    Fixed now. Please test (from repository) if you have time.

     
  • Harald Oehlmann

    Harald Oehlmann - 2025-07-30

    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

     
  • Ashok P. Nadkarni

    • status: open --> closed
     
  • Ashok P. Nadkarni

    Fixed for 5.1.1

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB