From 002f9aee7645abab2c8e4119f896fdfaa0895e72 Mon Sep 17 00:00:00 2001 From: Tom Goff Date: Fri, 28 Aug 2015 17:54:22 -0400 Subject: [PATCH] fixed adj widget to use node names instead of node id which would cause a crash if the names were changed using olsrv1/olsrv2 From: dean --- gui/widget.tcl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gui/widget.tcl b/gui/widget.tcl index 9ecf64ff..ed84ccf9 100644 --- a/gui/widget.tcl +++ b/gui/widget.tcl @@ -1934,13 +1934,15 @@ proc get_router_id {node} { set sock [lindex [getEmulPlugin $node] 2] set exec_num [newExecCallbackRequest adjacencyrouterid] - set cmd "nrlConsole.py ${node}_olsr i" + set name [getNodeName $node] + set cmd "nrlConsole.py ${name}_olsr i" sendExecMessage $sock $node $cmd $exec_num 0x30 return "" } elseif {[lsearch [getNodeServices $node true] "OLSRv2"] != -1 } { set sock [lindex [getEmulPlugin $node] 2] set exec_num [newExecCallbackRequest adjacencyrouterid] - set cmd "nrlConsole.py ${node}_olsrv2 i" + set name [getNodeName $node] + set cmd "nrlConsole.py ${name}_olsrv2 i" sendExecMessage $sock $node $cmd $exec_num 0x30 return "" } @@ -2047,7 +2049,8 @@ proc widget_adjacency_periodic { now } { # widget_adjacency_callback after the response has been received set sock [lindex [getEmulPlugin $node] 2] set exec_num [newExecCallbackRequest adjacency] - set cmd "nrlConsole.py ${node}_olsr n" + set name [getNodeName $node] + set cmd "nrlConsole.py ${name}_olsr n" sendExecMessage $sock $node $cmd $exec_num 0x30 } } elseif { $proto == "OLSRv2_proto" } { @@ -2062,7 +2065,8 @@ proc widget_adjacency_periodic { now } { # widget_adjacency_callback after the response has been received set sock [lindex [getEmulPlugin $node] 2] set exec_num [newExecCallbackRequest adjacency] - set cmd "nrlConsole.py ${node}_olsrv2 n" + set name [getNodeName $node] + set cmd "nrlConsole.py ${name}_olsrv2 n" sendExecMessage $sock $node $cmd $exec_num 0x30 } } else {