Permalink
Browse files

this-pcv

  • Loading branch information...
hypatia2 committed Aug 18, 2015
1 parent 29d4292 commit 92648280e167ecf3e8d3efdcec2b57b23a579fcf
Showing with 16 additions and 11 deletions.
  1. +2 −2 fruho/add_securitykiss.tcl
  2. +14 −9 fruho/main.tcl
@@ -86,7 +86,7 @@ proc ::securitykiss::ImportClicked {tab} {
$pconf.importline.msg configure -text "Importing configuration from $dispname"
$pconf.importline.button configure -state disabled
set result [vpapi-config-direct $newprofilename $host $port $path_config $username $password]
set result [vpapi-config-direct $newprofilename $host $port $path_config?[this-pcv] $username $password]
if {$result != 200} {
if {$result == 401} {
set msg "Incorrect username or password"
@@ -99,7 +99,7 @@ proc ::securitykiss::ImportClicked {tab} {
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
set result [vpapi-plans-direct $newprofilename $host $port $path_plans $username $password]
set result [vpapi-plans-direct $newprofilename $host $port $path_plans?[this-pcv] $username $password]
if {$result != 200} {
if {$result == 401} {
set msg "Incorrect username/password"
@@ -346,9 +346,8 @@ proc main-gui {} {
proc check-for-updates {uframe} {
try {
set platform [this-os]-[this-arch]
channel {chout cherr} 1
curl-dispatch $chout $cherr bootstrap -urlpath /check-for-updates/$platform
curl-dispatch $chout $cherr bootstrap -urlpath /check-for-updates?[this-pcv]
select {
<- $chout {
set data [<- $chout]
@@ -500,10 +499,9 @@ proc plan-comparator {tstamp a b} {
proc get-welcome {} {
try {
channel {chout cherr} 5
set platform [this-os]-[this-arch]
set success 0
for {set i 0} {$i < 3 && !$success} {incr i} {
curl-dispatch $chout $cherr bootstrap -urlpath /welcome/[build-version]/$platform/$::model::Cn
curl-dispatch $chout $cherr bootstrap -urlpath /welcome?[this-pcv]
select {
<- $chout {
set data [<- $chout]
@@ -560,7 +558,7 @@ proc get-external-loc {} {
channel {chout cherr} 5
set success 0
for {set i 0} {$i < 3 && !$success} {incr i} {
curl-dispatch $chout $cherr bootstrap -urlpath /loc?as=json
curl-dispatch $chout $cherr bootstrap -urlpath /loc?[this-pcv]&as=json
select {
<- $chout {
set data [<- $chout]
@@ -604,7 +602,7 @@ proc get-bulk-loc {ips} {
set loc {}
set success 0
for {set i 0} {$i < 3 && !$success} {incr i} {
curl-dispatch $chout $cherr bootstrap -urlpath /loc -method POST -type text/plain -postfromfile $ipfile
curl-dispatch $chout $cherr bootstrap -urlpath /loc?[this-pcv] -method POST -type text/plain -postfromfile $ipfile
select {
<- $chout {
set data [<- $chout]
@@ -887,23 +885,23 @@ proc get-faas-config {} {
set password ""
if {![is-cert-received fruho]} {
set result [vpapi-cert-direct Fruho bootstrap /vpapi/cert $username $password]
set result [vpapi-cert-direct Fruho bootstrap /vpapi/cert?[this-pcv] $username $password]
if {$result != 200} {
puts stderr [log "ERROR: vpapi-cert-direct Fruho failed with status $result"]
return $result
}
puts stderr [log vpapi-cert-direct Fruho SUCCESS]
}
if {![is-config-received fruho]} {
set result [vpapi-config-direct Fruho bootstrap /vpapi/config $username $password]
set result [vpapi-config-direct Fruho bootstrap /vpapi/config?[this-pcv] $username $password]
if {$result != 200} {
puts stderr [log "ERROR: vpapi-config-direct Fruho failed with status $result"]
return $result
}
puts stderr [log vpapi-config-direct Fruho SUCCESS]
}
if {![dict exists $::model::Profiles fruho plans]} {
set result [vpapi-plans-direct Fruho bootstrap /vpapi/plans $username $password]
set result [vpapi-plans-direct Fruho bootstrap /vpapi/plans?[this-pcv] $username $password]
if {$result != 200} {
puts stderr [log "ERROR: vpapi-plans-direct Fruho failed with status $result"]
return $result
@@ -2213,6 +2211,13 @@ proc resolve-host {host} {
}
proc this-pcv {} {
set platform [this-os]-[this-arch]
set version [build-version]
set cn $::model::Cn
return "p=$platform&v=$version&c=$cn"
}
# tablelist vs TkTable vs treectrl vs treeview vs BWidget::Tree

0 comments on commit 9264828

Please sign in to comment.