From 3dfd467727be84089dd8c39aac2df4f7ee9b43aa Mon Sep 17 00:00:00 2001 From: Edwin Mons <edwin.mons@isode.com> Date: Mon, 18 Nov 2013 10:49:04 +0100 Subject: Sluift: add bosh_url client option Change-Id: I42b14f411531f8814bbb85f3941772a4149c4171 diff --git a/Sluift/client.cpp b/Sluift/client.cpp index 04ce8f4..d6f876f 100644 --- a/Sluift/client.cpp +++ b/Sluift/client.cpp @@ -340,6 +340,10 @@ SLUIFT_LUA_FUNCTION(Client, set_options) { bool useTLS = lua_toboolean(L, -1); client->getOptions().useTLS = (useTLS ? ClientOptions::UseTLSWhenAvailable : ClientOptions::NeverUseTLS); } + lua_getfield(L, 2, "bosh_url"); + if (!lua_isnil(L, -1)) { + client->getOptions().boshURL = URL::fromString(lua_tostring(L, -1)); + } lua_pushvalue(L, 1); return 0; } -- cgit v0.10.2-6-g49f6