]> xenbits.xensource.com Git - osstest.git/commitdiff
Planner: ms-queuedaemon: Break out chan-plan-info
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 7 Sep 2015 14:20:27 +0000 (15:20 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Sep 2015 10:29:20 +0000 (11:29 +0100)
Also, refactor the space separator handling to use a list and `join'
(since we are going to maybe have desc be "").

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

ms-queuedaemon

index 18d703e7f25c651220fb75d8a78b2a026fa7193b..72e22d00b3cc5622c4ab2e17cefa83aeac37c83a 100755 (executable)
@@ -375,14 +375,20 @@ proc cmd/get-last-plan {chan desc w} {
     return-plan-to-client $chan $w.final
 }
 
+proc chan-plan-info {chan desc} {
+    set l {}
+    lappend l [chan-get-info $chan {"$info(preinfo)"} ""]
+    lappend l [chan-get-info $chan {"job $info(job)"} $desc]
+    return [join $l " "]
+}
+
 proc cmd/book-resources {chan desc bytes} {
     read-chan-data $chan $bytes do-book-resources
 }
 proc do-book-resources {chan desc data} {
     global plan errorInfo
     set w [check-we-are-thinking $chan]
-    set info [chan-get-info $chan {"$info(preinfo) "} ""]
-    append info [chan-get-info $chan {"job $info(job)"} $desc]
+    set info [chan-plan-info $plan $desc]
     if {[catch {
        exec ./ms-planner -w$w book-resources $info << $data
     } emsg]} {