From 2772e69a40f6c8079f98935e92afdda543d822de Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 3 May 2011 15:58:47 +0200 Subject: [PATCH] sipjreen: implement setProxy() --- src/sip/jreen/jabber.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/sip/jreen/jabber.cpp b/src/sip/jreen/jabber.cpp index 2ad5ec7a7..7d90cb303 100644 --- a/src/sip/jreen/jabber.cpp +++ b/src/sip/jreen/jabber.cpp @@ -115,7 +115,20 @@ JabberPlugin::~JabberPlugin() void JabberPlugin::setProxy( QNetworkProxy* proxy ) { - qDebug() << Q_FUNC_INFO << "Not implemented"; + if(m_currentServer.isEmpty() || !(m_currentPort > 0)) + { + // patches are welcome in Jreen that implement jdns through proxy + qDebug() << Q_FUNC_INFO << "Jreen proxy only works when you explicitly set host and port"; + Q_ASSERT(false); + return; + } + + if(!m_client->connection()) + { + m_client->setConnection(new TcpConnection(m_currentServer, m_currentPort)); + } + + qobject_cast(m_client->connection())->setProxy(proxy); }