Permalink
Browse files

stderr logging cleanup

  • Loading branch information...
hypatia2 committed Apr 1, 2016
1 parent 786c170 commit c8fee2dded15aef458fd65b0d5f9de4ad43dc08a
@@ -68,7 +68,6 @@ proc ::airvpn::ImportClicked {tab args} {
importline-update $pconf [http2importline $result] normal empty
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
set result [vpapi-plans-direct $newprofilename $host $port $path_plans?[this-pcv] $username $password]
if {$result != 200} {
@@ -84,8 +83,6 @@ proc ::airvpn::ImportClicked {tab args} {
dict set ::model::Profiles $profileid vpapi_path_plans $path_plans
dict set ::model::Profiles $profileid provider $name
puts stderr "VPAPI-PLANS-DIRECT completed"
importline-update $pconf "" normal empty
set ::${name}::username ""
set ::${name}::password ""
@@ -67,7 +67,6 @@ proc ::cactusvpn::ImportClicked {tab args} {
importline-update $pconf [http2importline $result] normal empty
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
set result [vpapi-plans-direct $newprofilename $host $port $path_plans?[this-pcv] $username $password]
if {$result != 200} {
@@ -83,8 +82,6 @@ proc ::cactusvpn::ImportClicked {tab args} {
dict set ::model::Profiles $profileid vpapi_path_plans $path_plans
dict set ::model::Profiles $profileid provider $name
puts stderr "VPAPI-PLANS-DIRECT completed"
importline-update $pconf "" normal empty
set ::${name}::username ""
set ::${name}::password ""
@@ -70,11 +70,10 @@ proc ::from_file::ImportClicked {tab name} {
set profileid [name2id $newprofilename]
if {[are-selected-files-correct $::model::Gui_selected_files]} {
set tempdir [copy2temp $::model::Gui_selected_files]
puts stderr [log "tempdir: $tempdir"]
log "tempdir: $tempdir"
# find ovpn file in the bundle, if many take first
set ovpn [convert-config $tempdir]
#puts stderr "\n$ovpn\n"
if {$ovpn eq ""} {
importline-update $pconf "No openvpn config in selected files" normal empty
return
@@ -85,7 +84,7 @@ proc ::from_file::ImportClicked {tab name} {
::ovconf::parse $ovpnfile
set slist [extract-servers $tempdir]
puts stderr [log "slist: $slist"]
log "slist: $slist"
if {$slist eq ""} {
importline-update $pconf "No server candidates in selected files" normal empty
return
@@ -237,15 +236,15 @@ proc ::from_file::extract-servers {tempdir} {
set files [concat $files [find-ovpn-in $tempdir */*/* 1]]
# list of triples {host proto port}
set endpoints {}
puts stderr [log "extract-servers files: $files"]
log "extract-servers files: $files"
foreach f $files {
puts stderr [log "Processing $f"]
log "Processing $f"
set ovpn [slurp $f]
puts stderr [log "slurp ovpn: $ovpn"]
log "slurp ovpn: $ovpn"
set remotes [ovconf raw-get $ovpn remote]
set remotes [concat $remotes [ovconf raw-get $ovpn #remote]]
set remotes [concat $remotes [ovconf raw-get $ovpn "# remote"]]
puts stderr [log "remotes: $remotes"]
log "remotes: $remotes"
set proto [ovconf raw-get $ovpn proto]
foreach r $remotes {
# if proto not given in a separate line in config try to get proto from the remote line (ibVPN provides such config)
@@ -72,7 +72,6 @@ proc ::hideipvpn::ImportClicked {tab args} {
importline-update $pconf [http2importline $result] normal empty
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
# in case of hideipvpn using username and password has a different purpose than authentication
# instead of using for basic authentication (any strings will pass) the credentials are included in the returned config.ovpn
@@ -88,8 +87,6 @@ proc ::hideipvpn::ImportClicked {tab args} {
dict set ::model::Profiles $profileid vpapi_path_plans $path_plans
dict set ::model::Profiles $profileid provider $name
puts stderr "VPAPI-PLANS-DIRECT completed"
importline-update $pconf "" normal empty
set ::${name}::username ""
set ::${name}::password ""
@@ -65,7 +65,6 @@ proc ::ibvpn::ImportClicked {tab args} {
importline-update $pconf [http2importline $result] normal empty
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
set result [vpapi-plans-direct $newprofilename $host $port $path_plans?[this-pcv] $username $password]
if {$result != 200} {
@@ -81,8 +80,6 @@ proc ::ibvpn::ImportClicked {tab args} {
dict set ::model::Profiles $profileid vpapi_path_plans $path_plans
dict set ::model::Profiles $profileid provider $name
puts stderr "VPAPI-PLANS-DIRECT completed"
importline-update $pconf "" normal empty
set ::${name}::username ""
set ::${name}::password ""
@@ -73,7 +73,6 @@ proc ::mullvad::ImportClicked {tab args} {
importline-update $pconf [http2importline $result] normal empty
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
set result [vpapi-plans-direct $newprofilename $host $port $path_plans?[this-pcv] $username $password]
if {$result != 200} {
@@ -86,8 +85,6 @@ proc ::mullvad::ImportClicked {tab args} {
dict set ::model::Profiles $profileid vpapi_path_plans $path_plans
dict set ::model::Profiles $profileid provider $name
puts stderr "VPAPI-PLANS-DIRECT completed"
importline-update $pconf "" normal empty
set ::${name}::username ""
@@ -67,7 +67,6 @@ proc ::securitykiss::ImportClicked {tab args} {
importline-update $pconf [http2importline $result] normal empty
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
set result [vpapi-plans-direct $newprofilename $host $port $path_plans?[this-pcv] $username $password]
if {$result != 200} {
@@ -83,7 +82,6 @@ proc ::securitykiss::ImportClicked {tab args} {
dict set ::model::Profiles $profileid vpapi_path_plans $path_plans
dict set ::model::Profiles $profileid provider $name
puts stderr "VPAPI-PLANS-DIRECT completed"
importline-update $pconf "" normal empty
set ::${name}::username ""
@@ -66,7 +66,6 @@ proc ::vpnbook::ImportClicked {tab args} {
importline-update $pconf [http2importline $result] normal empty
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
set result [vpapi-plans-direct $newprofilename $host $port $path_plans?[this-pcv] $username $password]
if {$result != 200} {
@@ -82,8 +81,6 @@ proc ::vpnbook::ImportClicked {tab args} {
dict set ::model::Profiles $profileid vpapi_path_plans $path_plans
dict set ::model::Profiles $profileid provider $name
puts stderr "VPAPI-PLANS-DIRECT completed"
importline-update $pconf "" normal empty
set ::${name}::username ""
set ::${name}::password ""
@@ -67,7 +67,6 @@ proc ::vyprvpn::ImportClicked {tab args} {
importline-update $pconf [http2importline $result] normal empty
return
}
puts stderr "VPAPI-CONFIG-DIRECT completed"
set result [vpapi-plans-direct $newprofilename $host $port $path_plans?[this-pcv] $username $password]
if {$result != 200} {
@@ -83,8 +82,6 @@ proc ::vyprvpn::ImportClicked {tab args} {
dict set ::model::Profiles $profileid vpapi_path_plans $path_plans
dict set ::model::Profiles $profileid provider $name
puts stderr "VPAPI-PLANS-DIRECT completed"
importline-update $pconf "" normal empty
set ::${name}::username ""
set ::${name}::password ""
Oops, something went wrong.

0 comments on commit c8fee2d

Please sign in to comment.