evolution-rss r120 - in trunk: . src



Author: lucilanga
Date: Mon Jan 21 06:14:30 2008
New Revision: 120
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=120&view=rev

Log:
proxy auth

Modified:
   trunk/ChangeLog
   trunk/TODO
   trunk/src/network-soup.c
   trunk/src/rss.c
   trunk/src/rss.h

Modified: trunk/TODO
==============================================================================
--- trunk/TODO	(original)
+++ trunk/TODO	Mon Jan 21 06:14:30 2008
@@ -29,6 +29,9 @@
 	* implement other engines besides soup
 	* implement USM (universal subscription mechanism)
 	* feed://
-	* fix authentication for proxy
-	* fix no channel information condition
+	* fix authentication for proxy dialog
 	* fix 3270 lin
+	* use svn tag stuff when releasing
+	* fix when editing existing feeds
+	* fix ubuntu crashing when wrong entities
+	* do not remove hash key when iterate !

Modified: trunk/src/network-soup.c
==============================================================================
--- trunk/src/network-soup.c	(original)
+++ trunk/src/network-soup.c	Mon Jan 21 06:14:30 2008
@@ -1,5 +1,5 @@
 /*  Evolution RSS Reader Plugin
- *  Copyright (C) 2007  Lucian Langa <cooly mips edu ms>
+ *  Copyright (C) 2007-2008  Lucian Langa <cooly mips edu ms>
  *         
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -150,19 +150,18 @@
     gchar *pass_proxy =
         gconf_client_get_string(rss_gconf, GCONF_KEY_PASS_PROXY, NULL);
 
-
     if (use_proxy && host_proxy && port_proxy > 0)
     {
         gchar *proxy_uri = 
             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)
@@ -290,9 +289,13 @@
         char **password,
         gpointer data)
 {
-		create_user_pass_dialog(data);
-        *username = g_strdup(g_hash_table_lookup(rf->hruser, data));
-        *password = g_strdup(g_hash_table_lookup(rf->hrpass, data));
+	if (rf->soup_auth_retry)
+	{
+		 if (create_user_pass_dialog(data))
+			rf->soup_auth_retry = FALSE;
+        	*username = g_strdup(g_hash_table_lookup(rf->hruser, data));
+        	*password = g_strdup(g_hash_table_lookup(rf->hrpass, data));
+	}
 }
 
 static int

Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c	(original)
+++ trunk/src/rss.c	Mon Jan 21 06:14:30 2008
@@ -523,7 +523,7 @@
     }*/
 }
 
-void
+gboolean
 create_user_pass_dialog(gchar *url)
 {
 GtkWidget *dialog1;
@@ -538,6 +538,7 @@
   GtkWidget *okbutton1;
   GtkWidget *checkbutton1;
   GtkWidget *vbox1;
+  guint resp;
 
   if (!rf->hruser)
         rf->hruser = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
@@ -628,21 +629,26 @@
     case GTK_RESPONSE_OK:
         if (user)
             g_hash_table_remove(rf->hruser, url);
-        g_hash_table_insert(rf->hruser, url, g_strdup(gtk_entry_get_text (GTK_ENTRY (username))));
+        g_hash_table_insert(rf->hruser, url, 
+		g_strdup(gtk_entry_get_text (GTK_ENTRY (username))));
         if (pass)
             g_hash_table_remove(rf->hrpass, url);
-        g_hash_table_insert(rf->hrpass, url, g_strdup(gtk_entry_get_text (GTK_ENTRY (password))));
+        g_hash_table_insert(rf->hrpass, url, 
+		g_strdup(gtk_entry_get_text (GTK_ENTRY (password))));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton1)))
 		save_up(url);
 	else
 		del_up(url);
 	
         gtk_widget_destroy (dialog1);
+	resp = 0;
         break;
     default:
         gtk_widget_destroy (dialog1);
+	resp = 1;
         break;
   }
+	return resp;
 }
 
 add_feed *
@@ -4364,6 +4370,7 @@
 			rf->rc_id = 0;
 			rf->feed_queue = 0;
 			rf->main_folder = get_main_folder();
+			rf->soup_auth_retry = 1;
 			get_feed_folders();
 #if HAVE_DBUS
 			g_print("init_dbus()\n");

Modified: trunk/src/rss.h
==============================================================================
--- trunk/src/rss.h	(original)
+++ trunk/src/rss.h	Mon Jan 21 06:14:30 2008
@@ -53,6 +53,7 @@
         GHashTable      *hrh;   		//fetch html flag
         GHashTable      *hruser;   		//auth user hash
         GHashTable      *hrpass;   		//auth user hash
+	gboolean	soup_auth_retry;	//wether to retry auth after an unsucessful auth
         GHashTable      *hrdel_feed;   		//option to delete messages in current feed
         GHashTable      *hrdel_days;   		//option to delete messages older then days
         GHashTable      *hrdel_messages; 	//option to keep last messages
@@ -227,7 +228,7 @@
 } create_feed;
 
 u_int32_t gen_crc(const char *msg);
-void create_user_pass_dialog(gchar *url);
+gboolean create_user_pass_dialog(gchar *url);
 static void start_check_cb (GtkWidget *widget, gpointer data);
 static void err_destroy (GtkWidget *widget, guint response, gpointer data);
 static gboolean check_if_match (gpointer key, gpointer value, gpointer user_data);



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