Patch: avoid crashes when there's no implementation of reconnection



	Hi,

	Here goes the 4th patch from the work last week. It prevents a crash
when CamelImapStore does not have a reconnecting operation. The question
is, can this happen really? Or is the bug in any other place, and we
should always get a valid reconnection operation?

	The commit is in svn r2479, the changelog:

* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:
(camel_imap_recon): if there's no reconnection operation, then we don't
call it, preventing crashes.

-- 
Jose Dapena Paz <jdapena igalia com>
Igalia
Index: libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
===================================================================
--- libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c	(revisión: 2478)
+++ libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c	(revisión: 2479)
@@ -162,10 +162,12 @@
 		sleep (1);
 		camel_service_connect (service, mex);
 	}
-	if (!camel_exception_is_set (mex) && service->reconnection)
-		service->reconnection (service, TRUE, service->data);
-	else
-		service->reconnection (service, FALSE, service->data);
+	if (service->reconnection) {
+		if (!camel_exception_is_set (mex))
+			service->reconnection (service, TRUE, service->data);
+		else
+			service->reconnection (service, FALSE, service->data);
+	}
 
 	service->reconnecting = FALSE;
 }
Index: ChangeLog
===================================================================
--- ChangeLog	(revisión: 2478)
+++ ChangeLog	(revisión: 2479)
@@ -1,3 +1,9 @@
+2007-07-20  Jose Dapena Paz  <jdapena igalia com>
+
+	* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:
+	(camel_imap_recon): if there's no reconnection operation, then we don't
+	call it, preventing crashes.
+
 2007-07-19  Jose Dapena Paz  <jdapena igalia com>
 
 	* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c:


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