summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-27 12:55:45 +0000
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-07 10:43:04 +0000
commit76672431edce6b39664cf00da33cc458c54c947b (patch)
tree78f081c79e88c3a89c4bcf9e41645185a456f027 /src
parent93617df81979d0df5afce984c388e361c80f5c97 (diff)
rename NB_SOCKS5_PROXIES_USED to NB_MIN_SOCKS5_PROXIES and decrease it to 3
Diffstat (limited to 'src')
-rw-r--r--src/bytestream-factory.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index 536a5bdb2..8ba82aa34 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -46,7 +46,8 @@
G_DEFINE_TYPE (GabbleBytestreamFactory, gabble_bytestream_factory,
G_TYPE_OBJECT);
-#define NB_SOCKS5_PROXIES_USED 5
+/* The number of proxy we'll try to have at a minimum in the cache. */
+#define NB_MIN_SOCKS5_PROXIES 3
#define SOCKS5_PROXY_TIMEOUT 10
/* properties */
@@ -372,14 +373,14 @@ gabble_bytestream_factory_query_socks5_proxies (GabbleBytestreamFactory *self)
nb_proxies_found = g_slist_length (priv->socks5_proxies) +
g_slist_length (priv->socks5_fallback_proxies);
- if (nb_proxies_found >= NB_SOCKS5_PROXIES_USED)
+ if (nb_proxies_found >= NB_MIN_SOCKS5_PROXIES)
{
DEBUG ("we already have discovered enough proxies (%u)",
nb_proxies_found);
return;
}
- nb_proxies_needed = NB_SOCKS5_PROXIES_USED - nb_proxies_found;
+ nb_proxies_needed = NB_MIN_SOCKS5_PROXIES - nb_proxies_found;
DEBUG ("Need %u more proxies", nb_proxies_needed);
for (i = 0; i < nb_proxies_needed &&