diff options
author | Roger Planas <roger.planas@isode.com> | 2013-12-13 11:32:13 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-12-15 11:34:40 (GMT) |
commit | 503a8077c8811c2e9f65a619c33690a36eb5c153 (patch) | |
tree | f931f4de989d43a393f82cdddc1461e7e5b0ab40 /Sluift/client.cpp | |
parent | 8cf453060fb5d7b494947cb627a4ca31ba8c937c (diff) | |
download | swift-contrib-503a8077c8811c2e9f65a619c33690a36eb5c153.zip swift-contrib-503a8077c8811c2e9f65a619c33690a36eb5c153.tar.bz2 |
Sluift: Fix default values for port and host for connect
Change-Id: Ia19e0a3763005df7fb7db6b57841d6559f74ef46
Diffstat (limited to 'Sluift/client.cpp')
-rw-r--r-- | Sluift/client.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Sluift/client.cpp b/Sluift/client.cpp index 2ca62d6..cd675fa 100644 --- a/Sluift/client.cpp +++ b/Sluift/client.cpp @@ -48,6 +48,6 @@ SLUIFT_LUA_FUNCTION(Client, async_connect) { SluiftClient* client = getClient(L); - std::string host; - int port = -1; + std::string host = client->getOptions().manualHostname; + int port = client->getOptions().manualPort; if (lua_istable(L, 2)) { if (boost::optional<std::string> hostString = Lua::getStringField(L, 2, "host")) { @@ -58,10 +58,5 @@ SLUIFT_LUA_FUNCTION(Client, async_connect) { } } - if (host.empty() && port == -1) { - client->connect(); - } - else { client->connect(host, port); - } return 0; } |