]> xenbits.xensource.com Git - osstest.git/commitdiff
Tcl: Provide get-chan-desc in daemonlib
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 7 Sep 2015 14:42:04 +0000 (15:42 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Sep 2015 10:29:20 +0000 (11:29 +0100)
Provide a facility for the daemon main program to get the channel
connection information.

No caller yet.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: New patch

tcl/daemonlib.tcl

index d097624fbc7a3b29b80b140cf8528a5f4879296f..55bc385adb3f8c832b8e5ed29edcd2fe301fbd7f 100644 (file)
@@ -106,6 +106,11 @@ proc puts-chan-desc {chan m} {
     log "$desc $m"
 }
 
+proc get-chan-desc {chan} {
+    upvar \#0 chandesc($chan) desc
+    return $desc
+}
+
 proc must-gets-chan {chan re} {
     if {[gets $chan l] <= 0} { error "NOT $chan $re ?" }
     puts-chan-desc $chan "<< $l"