From 565c32e58c987603b573000167e4fe3baf1e69c6 Mon Sep 17 00:00:00 2001 From: Timothy Stack <stack@flux.utah.edu> Date: Wed, 9 Mar 2005 16:37:06 +0000 Subject: [PATCH] Fix the default command value that gets used in the "program run" event. --- tbsetup/ns2ir/sim.tcl.in | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tbsetup/ns2ir/sim.tcl.in b/tbsetup/ns2ir/sim.tcl.in index 682d48b75e..c4c6db52d2 100644 --- a/tbsetup/ns2ir/sim.tcl.in +++ b/tbsetup/ns2ir/sim.tcl.in @@ -1264,13 +1264,13 @@ Simulator instproc make_event {outer event} { } else { set default_command [$obj set command] } - ::GLOBALS::named-args $evargs { - -command $default_command - -dir {} - -timeout {} - -expected-exit-code {} - -tag {} - } + ::GLOBALS::named-args $evargs [list \ + -command $default_command \ + -dir {} \ + -timeout {} \ + -expected-exit-code {} \ + -tag {} \ + ] if {$(-dir) != {}} { set args "DIR={$(-dir)} " } @@ -1289,7 +1289,9 @@ Simulator instproc make_event {outer event} { set args "${args}TIMEOUT={$to} " } } - set args "${args}COMMAND=$(-command)" + if {$(-command) != {}} { + set args "${args}COMMAND=$(-command)" + } } "start" { set etype START -- GitLab