Patch: problems modifying the current imap connection



	Hi,

	I'm getting some problems using imap provider, as it seems it ignores
completely the changes I do in some server connection parameters.

	I found that the problem seems to be caused by reusing addrinfo even
when we change the server and port connection. My patch simply removes
the old addrinfo each time we call to connect_to_server_wrapper.

Changelog entry:
2008-02-27  Jose Dapena Paz  <jdapena igalia com>

* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:
	Now we regenerate the addrinfo on each call to 
	connect_to_server_wrapper.

-- 
Jose Dapena Paz <jdapena igalia com>
Igalia
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 3433)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2008-02-27  Jose Dapena Paz  <jdapena igalia com>
+
+	* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:
+	Now we regenerate the addrinfo on each call to connect_to_server_wrapper.
+
 2008-02-21  Jose Dapena Paz  <jdapena igalia com>
 
 	* libtinymail-camel/tny-camel-mime-part.c:
Index: libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
===================================================================
--- libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c	(revision 3433)
+++ libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c	(working copy)
@@ -1342,6 +1342,11 @@
 	hints.ai_socktype = SOCK_STREAM;
 	hints.ai_family = PF_UNSPEC;
 
+	if (store->addrinfo != NULL) {
+		camel_freeaddrinfo (store->addrinfo);
+		store->addrinfo = NULL;
+	}
+
 	if (store->addrinfo == NULL)
 		store->addrinfo = camel_getaddrinfo(service->url->host, serv, &hints, ex);
 


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