summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-09-17 11:52:40 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-09-17 18:01:27 (GMT)
commitd1aaf7fc9b9da32f04f84eef06bc0ee731e79223 (patch)
tree14ecd64cfd4b44e2664170983a5a0fefc47a03fd /Swift/QtUI/QtConnectionSettingsWindow.cpp
parent3d6aa3b50090c19b50ae488494f1459bade88da3 (diff)
downloadswift-contrib-d1aaf7fc9b9da32f04f84eef06bc0ee731e79223.zip
swift-contrib-d1aaf7fc9b9da32f04f84eef06bc0ee731e79223.tar.bz2
Fixed URL parsing/serializing.
Resolves: #1157,#1158
Diffstat (limited to 'Swift/QtUI/QtConnectionSettingsWindow.cpp')
-rw-r--r--Swift/QtUI/QtConnectionSettingsWindow.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Swift/QtUI/QtConnectionSettingsWindow.cpp b/Swift/QtUI/QtConnectionSettingsWindow.cpp
index 56ac65f..5bc2754 100644
--- a/Swift/QtUI/QtConnectionSettingsWindow.cpp
+++ b/Swift/QtUI/QtConnectionSettingsWindow.cpp
@@ -127,11 +127,12 @@ ClientOptions QtConnectionSettingsWindow::getOptions() {
options.boshURL = URL::fromString(Q2PSTRING(ui.bosh_uri->text()));
if (ui.bosh_manualProxy->isChecked()) {
std::string host = Q2PSTRING(ui.bosh_manualProxyHost->text());
- int port = 80;
try {
- port = boost::lexical_cast<int>(Q2PSTRING(ui.bosh_manualProxyPort->text()));
- } catch (const boost::bad_lexical_cast&) {}
- options.boshHTTPConnectProxyURL = URL("http", host, port, "");
+ int port = boost::lexical_cast<int>(Q2PSTRING(ui.bosh_manualProxyPort->text()));
+ options.boshHTTPConnectProxyURL = URL("http", host, port, "");
+ } catch (const boost::bad_lexical_cast&) {
+ options.boshHTTPConnectProxyURL = URL("http", host, "");
+ }
}
}
}