[Evolution-hackers] [PATCH] handle "Unimplemented" NNTP DATE responses



Hello,

since it is the first time I look at evolution, I am posting this little
patch here, so that it could be eventually reviewed.

This small patch fixes the camel nntp provider to handle properly
newsservers that do not support the DATE command.

The nntp_get_date function is used to update the date of the last news
list, to use the NEWGROUPS command to fetch new newsgroups when
required.

Some (small) newsservers (such as SN) do not support the DATE command.
This patch makes the provider download the complete list of newsgroups
when DATE is unimplemented (the same behaviour already implemented when
the NEWGROUPS command is unavailable).

-- 
Alessandro Decina <alessandro nnva org>
--- evolution-data-server/camel/providers/nntp/camel-nntp-store.c	2005-04-13 18:13:24.000000000 +0200
+++ evolution-data-server-ale/camel/providers/nntp/camel-nntp-store.c	2005-04-13 14:41:51.000000000 +0200
@@ -781,7 +781,7 @@
 			date[13] = '\0';
 			
 			if (!nntp_get_date (nntp_store, ex))
-				goto error;
+				goto do_complete_list;
 			
 			ret = camel_nntp_command (nntp_store, ex, NULL, (char **) &line, "newgroups %s", date);
 			if (ret == -1)
@@ -801,8 +801,7 @@
 		do_complete_list:
 			/* seems we do need a complete list */
 			/* at first, we do a DATE to find out the last load occasion */
-			if (!nntp_get_date (nntp_store, ex))
-				goto error;
+			nntp_get_date (nntp_store, ex);
 			
 			ret = camel_nntp_command (nntp_store, ex, NULL, (char **)&line, "list");
 			if (ret == -1)


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