summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-26 13:50:23 +0000
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-26 17:13:31 +0000
commitbe8dbdc514ce479c4604e346206613790dba3011 (patch)
tree0ccb34bf881cce0956cf0a7135d003d95acbae15 /src
parenta5bdc7e1b21eb264a449c4c053831b1ec7bedf14 (diff)
fd.o#21151: Don't query SOCKS5 proxies when we are connected
We should query the SOCKS5 proxies only when we'll actually need them. Export the query method so other components will be able to start the querying process when needed.
Diffstat (limited to 'src')
-rw-r--r--src/bytestream-factory.c11
-rw-r--r--src/bytestream-factory.h3
2 files changed, 7 insertions, 7 deletions
diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index 4336aa48c..728d2a414 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -297,8 +297,6 @@ disco_item_found_cb (GabbleDisco *disco,
send_proxy_query (self, item->jid, FALSE);
}
-static void query_socks5_proxies (GabbleBytestreamFactory *self);
-
static gboolean
socks5_proxies_timeout_cb (gpointer data)
{
@@ -316,13 +314,14 @@ socks5_proxies_timeout_cb (gpointer data)
return FALSE;
}
- query_socks5_proxies (self);
+ gabble_bytestream_factory_query_socks5_proxies (self);
return FALSE;
}
-static void
-query_socks5_proxies (GabbleBytestreamFactory *self)
+/* ask to the factory to try to find more proxies if needed */
+void
+gabble_bytestream_factory_query_socks5_proxies (GabbleBytestreamFactory *self)
{
GabbleBytestreamFactoryPrivate *priv = GABBLE_BYTESTREAM_FACTORY_GET_PRIVATE (
self);
@@ -422,8 +421,6 @@ conn_status_changed_cb (GabbleConnection *conn,
priv->socks5_potential_proxies = randomize_g_slist (
priv->socks5_potential_proxies);
- query_socks5_proxies (self);
-
g_strfreev (jids);
}
}
diff --git a/src/bytestream-factory.h b/src/bytestream-factory.h
index dcc58fc53..ff5523de6 100644
--- a/src/bytestream-factory.h
+++ b/src/bytestream-factory.h
@@ -109,6 +109,9 @@ gchar *gabble_bytestream_factory_generate_stream_id (void);
GSList *gabble_bytestream_factory_get_socks5_proxies (
GabbleBytestreamFactory *self);
+void gabble_bytestream_factory_query_socks5_proxies (
+ GabbleBytestreamFactory *self);
+
G_END_DECLS
#endif /* #ifndef __BYTESTREAM_FACTORY_H__ */