(Boeing r1753)
properly support session options having spaces in value
This commit is contained in:
parent
f8f46d28be
commit
1116ff83b5
2 changed files with 3 additions and 3 deletions
|
@ -464,7 +464,7 @@ proc loadCfg { cfg } {
|
||||||
# uses 'key=value' instead of 'key value'
|
# uses 'key=value' instead of 'key value'
|
||||||
if { $object == "session" } {
|
if { $object == "session" } {
|
||||||
# 'key=value', values with space needs quoting 'key={space val}'
|
# 'key=value', values with space needs quoting 'key={space val}'
|
||||||
setSessionOptions "" $line
|
setSessionOptions "" [split $line "\n"]
|
||||||
set class ""
|
set class ""
|
||||||
set object ""
|
set object ""
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -1471,12 +1471,12 @@ proc resetSessionOptions {} {
|
||||||
proc setSessionOptions { types vals } {
|
proc setSessionOptions { types vals } {
|
||||||
global g_session_options
|
global g_session_options
|
||||||
foreach kv $vals {
|
foreach kv $vals {
|
||||||
set kvs [split $kv =]
|
set kvs [splitKeyValue $kv]
|
||||||
if {[llength $kvs] < 2} {
|
if {[llength $kvs] < 2} {
|
||||||
puts "error with session option: $kv"
|
puts "error with session option: $kv"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
set key [lindex $kvs 0]
|
set key [string trim [lindex $kvs 0]]
|
||||||
set value [lindex $kvs 1]
|
set value [lindex $kvs 1]
|
||||||
array set g_session_options [list $key $value]
|
array set g_session_options [list $key $value]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue