[telepathy-gabble/telepathy-gabble-0.8] rename NB_SOCKS5_PROXIES_USED to NB_MIN_SOCKS5_PROXIES and decrease it to 3

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Nov 27 04:55:45 PST 2009


---
 src/bytestream-factory.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index 1270178..68b4949 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 */
@@ -364,14 +365,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 &&
-- 
1.5.6.5




More information about the telepathy-commits mailing list