[evolution-rss] clean debugging cruft



commit c8de58113646484c50ca4c5e73a7dbc631e5604f
Author: Lucian Langa <lucilanga gnome org>
Date:   Tue Oct 27 09:47:08 2009 +0200

    clean debugging cruft

 src/fetch.c        |   24 ++++++++++++------------
 src/network-soup.c |   14 +++++++-------
 src/parser.c       |   12 ++++++------
 src/rss.c          |    4 ----
 4 files changed, 25 insertions(+), 29 deletions(-)
---
diff --git a/src/fetch.c b/src/fetch.c
index 5863fd7..c34ed22 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -1,16 +1,16 @@
 /*  Evolution RSS Reader Plugin
  *  Copyright (C) 2007-2009 Lucian Langa <cooly gnome eu org>
- *         
+ *
  *  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
- *  the Free Software Foundation; either version 2 of the License, or 
+ *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *                     
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                             
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
@@ -36,15 +36,15 @@ fetch_blocking(gchar *url, GSList *headers, GString *post,
 	gchar *buf, *fname;
 	GString *result = NULL;
 	FILE *f = NULL;
-	
+
 	scheme = g_uri_parse_scheme(url);
 	if (scheme && !g_ascii_strcasecmp(scheme, "file")) {
 		fname = g_filename_from_uri(url, NULL, NULL);
 		f = fopen(fname, "rb");
 		g_free(fname);
 		g_free(scheme);
-	 	if (f == NULL)
-                	goto error;	
+		if (f == NULL)
+			goto error;
 		buf = g_new0 (gchar, 4096);
 		result = g_string_new(NULL);
 		while (fgets(buf, 4096, f) != NULL) {
@@ -54,20 +54,20 @@ fetch_blocking(gchar *url, GSList *headers, GString *post,
 		return result;
 	} else {
 		g_free(scheme);
-        	return net_post_blocking(url, NULL, post, cb, data, err);
+		return net_post_blocking(url, NULL, post, cb, data, err);
 	}
 error:
 	g_print("error\n");
-	g_set_error(err, NET_ERROR, NET_ERROR_GENERIC, "%s", 
+	g_set_error(err, NET_ERROR, NET_ERROR_GENERIC, "%s",
                                 g_strerror(errno));
 	return result;
 }
 
 //fetch feed
-//FIXME gio callback hardcoded 
+//FIXME gio callback hardcoded
 
 gboolean
-fetch_unblocking(gchar *url, NetStatusCallback cb, gpointer data, 
+fetch_unblocking(gchar *url, NetStatusCallback cb, gpointer data,
 				gpointer cb2, gpointer cbdata2,
 				guint track,
 				GError **err)
@@ -87,7 +87,7 @@ fetch_unblocking(gchar *url, NetStatusCallback cb, gpointer data,
 				gio_finish_feed,
 				cbdata2,
 				0,
-				err);	
+				err);
 	} else {
 		g_free(scheme);
 		return net_get_unblocking(url,
diff --git a/src/network-soup.c b/src/network-soup.c
index 85886d0..db53dd6 100644
--- a/src/network-soup.c
+++ b/src/network-soup.c
@@ -519,7 +519,7 @@ net_get_status(const char *url, GError **err)
 		soup_session_abort(soup_sess);
 		g_object_unref(soup_sess);
 		rf->b_session = NULL;
-		g_set_error(err, NET_ERROR, NET_ERROR_GENERIC, "%s", 
+		g_set_error(err, NET_ERROR, NET_ERROR_GENERIC, "%s",
 				soup_status_get_phrase(req->status_code));
 		goto out;
 	}
@@ -528,13 +528,13 @@ out:
 	if (suri) soup_uri_free(suri);
 	response = req->status_code;
 	if (req) g_object_unref(G_OBJECT(req));
-	
+
 	return response;
 }
 
 gboolean
-net_get_unblocking(gchar *url, 
-				NetStatusCallback cb, gpointer data, 
+net_get_unblocking(gchar *url,
+				NetStatusCallback cb, gpointer data,
 				gpointer cb2, gpointer cbdata2,
 				guint track,
 				GError **err)
@@ -543,10 +543,10 @@ net_get_unblocking(gchar *url,
 	CallbackInfo *info = NULL;
 	gchar *agstr;
 
-	SoupSession *soup_sess = 
+	SoupSession *soup_sess =
 //		soup_session_async_new_with_options(SOUP_SESSION_TIMEOUT, SS_TIMEOUT, NULL);
 		soup_session_async_new();
-			
+
 
 #if LIBSOUP_VERSION > 2024000
 	if (rss_soup_jar) {
@@ -583,7 +583,7 @@ net_get_unblocking(gchar *url,
 	/* Queue an async HTTP request */
 	msg = soup_message_new ("GET", url);
 	if (!msg) {
-		g_set_error(err, NET_ERROR, NET_ERROR_GENERIC, "%s", 
+		g_set_error(err, NET_ERROR, NET_ERROR_GENERIC, "%s",
 				soup_status_get_phrase(2));			//invalid url
 		return FALSE;
 	}
diff --git a/src/parser.c b/src/parser.c
index 6f30365..f6fbfb4 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -1037,10 +1037,10 @@ update_channel(RDF *r)
 	    g_mkdir_with_parents (feed_dir, 0755);
 	feed_name = g_strdup_printf("%s/%s", feed_dir, buf);
 	g_free(feed_dir);
-	
+
 	fr = fopen(feed_name, "r");
 	fw = fopen(feed_name, "a+");
-	
+
 	for (i=0; NULL != (el = g_array_index(item, xmlNodePtr, i)); i++) {
 		update_sr_message();
 		if (rf->cancel) goto out;
@@ -1059,12 +1059,12 @@ update_channel(RDF *r)
 		}
 		uid = g_strdup(CF->feed_uri);
 		g_array_append_val(r->uids, uid);
-		CF->feedid 	= g_strdup(buf);
-		CF->sender 	= g_strdup(sender);
+		CF->feedid	= g_strdup(buf);
+		CF->sender	= g_strdup(sender);
 		if (r->prefix)
 			CF->full_path	= g_strconcat(r->prefix, "/", chn_name, NULL);
 		else
-			CF->full_path 	= g_strdup(chn_name);
+			CF->full_path	= g_strdup(chn_name);
 
 		subj = CF->subj;
 
@@ -1098,7 +1098,7 @@ out:	g_free(sender);
 
 	if (fr) fclose(fr);
 	if (fw) fclose(fw);
-	
+
 	g_free(feed_name);
 	return buf;
 }
diff --git a/src/rss.c b/src/rss.c
index fab75f1..78d6060 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -3250,12 +3250,8 @@ generic_finish_feed(rfMessage *msg, gpointer user_data)
 #endif
 	}
 
-g_print("pre finish\n");
 	if (rf->cancel_all)
 		goto out;
-g_print("finish\n");
-
-	g_print("err:%s\n", soup_status_get_phrase(msg->status_code));
 
 	if (msg->status_code != SOUP_STATUS_OK &&
 	    msg->status_code != SOUP_STATUS_CANCELLED) {



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