evolution-rss r124 - trunk/src



Author: lucilanga
Date: Wed Jan 23 19:49:24 2008
New Revision: 124
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=124&view=rev

Log:
abort soup fix

Modified:
   trunk/src/network-soup.c
   trunk/src/rss.c

Modified: trunk/src/network-soup.c
==============================================================================
--- trunk/src/network-soup.c	(original)
+++ trunk/src/network-soup.c	Wed Jan 23 19:49:24 2008
@@ -156,12 +156,12 @@
             g_strdup_printf("http://%s:%d/";, host_proxy, port_proxy); 
 
         SoupUri *puri = soup_uri_new (proxy_uri);
-/*	if (auth_proxy)
+	if (auth_proxy)
 	{
 		puri->user = g_strdup(user_proxy);
 		puri->passwd = g_strdup(pass_proxy);
 	}
-        g_object_set (G_OBJECT (session), SOUP_SESSION_PROXY_URI, puri, NULL);*/
+        g_object_set (G_OBJECT (session), SOUP_SESSION_PROXY_URI, puri, NULL);
         if (puri)
             g_free(puri);
         if (proxy_uri)

Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c	(original)
+++ trunk/src/rss.c	Wed Jan 23 19:49:24 2008
@@ -949,34 +949,21 @@
       		-1);
 }
 
-void
-cancel_soup_sess(gpointer key, gpointer value, gpointer user_data)
-{
-	// we need to check presence of the key because
-	// key might've disapeared due to weak ref
-	if (g_hash_table_lookup(rf->session, key))
-	{
-		if (SOUP_IS_SESSION(key))
-		{
-			if (SOUP_IS_MESSAGE(value))
-			{
-				soup_message_set_status(value,  SOUP_STATUS_CANCELLED);
-				soup_session_cancel_message(key, value);
-			}
-			soup_session_abort(key);
-		}
-//	g_hash_table_remove(rf->session, key);
-//	we probably need to weak ref this also
-	g_hash_table_find(rf->key_session,
-                remove_if_match,
-                user_data);
-	}
-}
-
 gboolean
-force_remove(gpointer key, gpointer value, gpointer user_data)
+cancel_soup_sess(gpointer key, gpointer value, gpointer user_data)
 {
-	return TRUE;
+       g_print("key:%p, value:%p ==", key, value);
+       if (SOUP_IS_SESSION(key))
+       {
+/*             if (SOUP_IS_MESSAGE(value))
+               {
+                       soup_message_set_status(value,  SOUP_STATUS_CANCELLED);
+                       soup_session_cancel_message(key, value);
+               }*/
+               soup_session_abort(key);
+       }
+       g_print(" key:%p, value:%p\n", key, value);
+       return TRUE;
 }
 
 void
@@ -985,8 +972,7 @@
 	//abort all session
 	if (rf->session)
 	{
-		g_hash_table_foreach(rf->session, cancel_soup_sess, NULL);
-		g_hash_table_foreach_remove(rf->session, force_remove, NULL);
+		g_hash_table_foreach_remove(rf->session, cancel_soup_sess, NULL);
 	}
 	if (rf->progress_bar)
 	{



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]