-- Jeffrey Stedfast Evolution Hacker - Novell, Inc. fejj ximian com - www.novell.com
? 72889.patch ? exchange-camel.patch ? lib/urltest Index: ChangeLog =================================================================== RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v retrieving revision 1.282 diff -u -r1.282 ChangeLog --- ChangeLog 3 Mar 2005 04:01:13 -0000 1.282 +++ ChangeLog 7 Mar 2005 20:37:45 -0000 @@ -1,3 +1,13 @@ +2005-03-07 Jeffrey Stedfast <fejj novell com> + + Fixes bug #72889, #72943 and probably others. + + * camel/camel-exchange-store.c (exchange_disconnect): Removed the + logic, put it into finalize() instead. Simply return TRUE here. + (exchange_connect): Moved the logic into construct(). + (construct): Init the strub and connect it. This needs to happen + here or offline mode breaks. + 2005-03-03 Rajesh Ranjan <rranjan redhat com> * configure.in : Added hi to ALL_LINGUAS. Index: camel/camel-exchange-store.c =================================================================== RCS file: /cvs/gnome/evolution-exchange/camel/camel-exchange-store.c,v retrieving revision 1.13 diff -u -r1.13 camel-exchange-store.c --- camel/camel-exchange-store.c 26 Feb 2005 14:19:15 -0000 1.13 +++ camel/camel-exchange-store.c 7 Mar 2005 20:37:45 -0000 @@ -117,6 +117,9 @@ camel_object_unref (CAMEL_OBJECT (exch->stub)); exch->stub = NULL; } + + g_free (exch->trash_name); + if (exch->folders_lock) g_mutex_free (exch->folders_lock); } @@ -219,12 +222,13 @@ return ppath; } + static void construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex) { CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (service); - char *p; + char *real_user, *socket_path, *p; CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex); @@ -237,10 +241,41 @@ *p = '\0'; } - exch->storage_path = camel_session_get_storage_path (session, service, ex); - + if (!(exch->storage_path = camel_session_get_storage_path (session, service, ex))) + return; + if (camel_url_get_param (url, "filter_junk")) CAMEL_STORE (service)->flags |= CAMEL_STORE_VJUNK; + + real_user = strpbrk (service->url->user, "\\/"); + if (real_user) + real_user++; + else + real_user = service->url->user; + socket_path = g_strdup_printf ("/tmp/.exchange-%s/%s %s", + g_get_user_name (), + real_user, service->url->host); + e_filename_make_safe (strchr (socket_path + 5, '/') + 1); + + exch->stub = camel_stub_new (socket_path, _("Evolution Exchange backend process"), ex); + g_free (socket_path); + if (!exch->stub) + return; + + /* Initialize the stub connection */ + if (!camel_stub_send (exch->stub, NULL, CAMEL_STUB_CMD_CONNECT, + CAMEL_STUB_ARG_RETURN, + CAMEL_STUB_ARG_END)) { + /* The user cancelled the connection attempt. */ + camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, + "Cancelled"); + camel_object_unref (exch->stub); + exch->stub = NULL; + return; + } + + camel_object_hook_event (CAMEL_OBJECT (exch->stub), "notification", + stub_notification, exch); } extern CamelServiceAuthType camel_exchange_password_authtype; @@ -271,58 +306,12 @@ static gboolean exchange_connect (CamelService *service, CamelException *ex) { - CamelExchangeStore *store = CAMEL_EXCHANGE_STORE (service); - char *real_user, *socket_path; - - if (!store->storage_path) - return FALSE; - - real_user = strpbrk (service->url->user, "\\/"); - if (real_user) - real_user++; - else - real_user = service->url->user; - socket_path = g_strdup_printf ("/tmp/.exchange-%s/%s %s", - g_get_user_name (), - real_user, service->url->host); - e_filename_make_safe (strchr (socket_path + 5, '/') + 1); - - store->stub = camel_stub_new (socket_path, _("Evolution Exchange backend process"), ex); - g_free (socket_path); - if (!store->stub) - return FALSE; - - /* Initialize the stub connection */ - if (!camel_stub_send (store->stub, NULL, CAMEL_STUB_CMD_CONNECT, - CAMEL_STUB_ARG_RETURN, - CAMEL_STUB_ARG_END)) { - /* The user cancelled the connection attempt. */ - camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, - "Cancelled"); - camel_object_unref (CAMEL_OBJECT (store->stub)); - store->stub = NULL; - return FALSE; - } - - camel_object_hook_event (CAMEL_OBJECT (store->stub), "notification", - stub_notification, store); - return TRUE; } static gboolean exchange_disconnect (CamelService *service, gboolean clean, CamelException *ex) { - CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (service); - - if (exch->stub) { - camel_object_unref (CAMEL_OBJECT (exch->stub)); - exch->stub = NULL; - } - - g_free (exch->trash_name); - exch->trash_name = NULL; - return TRUE; }
Attachment:
smime.p7s
Description: S/MIME cryptographic signature