Changeset 3429

Show
Ignore:
Timestamp:
02/21/08 18:58:16
Author:
svillar
Message:

* Merged with trunk 3416:3427 in order to include the latest fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/v1.0/pre-releases/v0.0.8/ChangeLog

    r3416 r3429  
     12008-02-21  Jose Dapena Paz  <jdapena@igalia.com> 
     2 
     3        * libtinymail-camel/tny-camel-mime-part.c: 
     4        Do not lose the filename of the attachment disposition in 
     5        case we set it as purged. 
     6 
     7        * libtinymail-camel/tny-camel-send-queue-priv.h, 
     8        libtinymail-camel/tny-camel-send-queue.c: 
     9        Now we don't send the run-queue-stop signal until 
     10        we've processed all sent signals. 
     11 
     12        * libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c: 
     13        Added a missing else that could cause freeing some summary info entries 
     14        when they shouldn't 
     15 
     16        * libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c: 
     17        (pop3_get_message). Now it works even if no exception parameter is passed. 
     18 
     192008-02-20  Philip Van Hoof <pvanhoof@gnome.org> 
     20 
     21        * Improvement for cancel's their reconnection 
     22 
    1232008-02-18  Philip Van Hoof <pvanhoof@gnome.org> 
    224 
  • releases/v1.0/pre-releases/v0.0.8/docs/devel/reference/tmpl/tny-account-store.sgml

    r3428 r3429  
    4949 
    5050</para> 
    51  
    52 @: 
    5351 
    5452@tnyaccountstore: the object which received the signal. 
  • releases/v1.0/pre-releases/v0.0.8/docs/devel/reference/tmpl/tny-account.sgml

    r3428 r3429  
    2828 
    2929</para> 
     30 
     31@: 
    3032 
    3133@tnyaccount: the object which received the signal. 
  • releases/v1.0/pre-releases/v0.0.8/docs/devel/reference/tmpl/tny-device.sgml

    r3428 r3429  
    3636 
    3737</para> 
    38  
    39 @:  
    40 @: 
    4138 
    4239@tnydevice: the object which received the signal. 
  • releases/v1.0/pre-releases/v0.0.8/docs/devel/reference/tmpl/tny-send-queue.sgml

    r3428 r3429  
    4040</para> 
    4141 
     42@:  
     43@:  
     44@:  
     45@: 
     46 
    4247@tnysendqueue: the object which received the signal. 
    4348@arg1:  
     
    4954 
    5055</para> 
     56 
     57@:  
     58@:  
     59@:  
     60@:  
     61@: 
    5162 
    5263@tnysendqueue: the object which received the signal. 
     
    6172</para> 
    6273 
     74@:  
     75@:  
     76@:  
     77@:  
     78@: 
     79 
    6380@tnysendqueue: the object which received the signal. 
    6481@arg1:  
     
    7289</para> 
    7390 
    74 @: 
    75  
    7691@tnysendqueue: the object which received the signal. 
    7792 
     
    8095 
    8196</para> 
    82  
    83 @: 
    8497 
    8598@tnysendqueue: the object which received the signal. 
  • releases/v1.0/pre-releases/v0.0.8/docs/devel/reference/tmpl/tny-shared.sgml

    r3428 r3429  
    5454</para> 
    5555 
    56 @tnyaccountstore: the object which received the signal. 
     56@:  
    5757 
    5858<!-- ##### STRUCT TnyAccountStoreIface ##### --> 
     
    262262</para> 
    263263 
    264 @:  
     264@tnyaccount: the object which received the signal. 
    265265 
    266266<!-- ##### SIGNAL TnyAccount::connection-status-changed ##### --> 
     
    321321</para> 
    322322 
    323 @tnydevice: the object which received the signal. 
    324 @arg1:  
     323@:  
     324@:  
    325325 
    326326<!-- ##### STRUCT TnyDeviceIface ##### --> 
     
    493493</para> 
    494494 
     495@tnysendqueue: the object which received the signal. 
     496@arg1:  
     497@arg2:  
     498@arg3:  
     499 
     500<!-- ##### SIGNAL TnySendQueue::msg-sending ##### --> 
     501<para> 
     502 
     503</para> 
     504 
     505@tnysendqueue: the object which received the signal. 
     506@arg1:  
     507@arg2:  
     508@arg3:  
     509@arg4:  
     510 
     511<!-- ##### SIGNAL TnySendQueue::msg-sent ##### --> 
     512<para> 
     513 
     514</para> 
     515 
     516@tnysendqueue: the object which received the signal. 
     517@arg1:  
     518@arg2:  
     519@arg3:  
     520@arg4:  
     521 
     522<!-- ##### SIGNAL TnySendQueue::queue-start ##### --> 
     523<para> 
     524 
     525</para> 
     526 
    495527@:  
     528 
     529<!-- ##### SIGNAL TnySendQueue::queue-stop ##### --> 
     530<para> 
     531 
     532</para> 
     533 
    496534@:  
    497 @:  
    498 @:  
    499  
    500 <!-- ##### SIGNAL TnySendQueue::msg-sending ##### --> 
    501 <para> 
    502  
    503 </para> 
    504  
    505 @:  
    506 @:  
    507 @:  
    508 @:  
    509 @:  
    510  
    511 <!-- ##### SIGNAL TnySendQueue::msg-sent ##### --> 
    512 <para> 
    513  
    514 </para> 
    515  
    516 @:  
    517 @:  
    518 @:  
    519 @:  
    520 @:  
    521  
    522 <!-- ##### SIGNAL TnySendQueue::queue-start ##### --> 
    523 <para> 
    524  
    525 </para> 
    526  
    527 @tnysendqueue: the object which received the signal. 
    528  
    529 <!-- ##### SIGNAL TnySendQueue::queue-stop ##### --> 
    530 <para> 
    531  
    532 </para> 
    533  
    534 @tnysendqueue: the object which received the signal. 
    535535 
    536536<!-- ##### STRUCT TnySendQueueIface ##### --> 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/camel-lite/camel/camel-operation.c

    r3256 r3429  
    2525#endif 
    2626 
    27 #include <pthread.h> 
    28 #include <stdio.h> 
    29 #include <unistd.h> 
    30 #include <sys/time.h> 
    31  
    32 #ifdef HAVE_NSS 
    33 #include <nspr.h> 
    34 #endif 
    35  
    36 #include <glib.h> 
    37  
    38 #include <libedataserver/e-msgport.h> 
    3927 
    4028#include "camel-operation.h" 
     
    5139}; 
    5240 
    53 struct _CamelOperation { 
    54         struct _CamelOperation *next; 
    55         struct _CamelOperation *prev; 
    56  
    57         pthread_t id;           /* id of running thread */ 
    58         guint32 flags;          /* cancelled ? */ 
    59         int blocked;            /* cancellation blocked depth */ 
    60         int refcount; 
    61  
    62         CamelOperationStatusFunc status; 
    63         void *status_data; 
    64         unsigned int status_update; 
    65  
    66         /* stack of status messages (struct _status_stack *) */ 
    67         GSList *status_stack; 
    68         struct _status_stack *lastreport; 
    69  
    70         EMsgPort *cancel_port; 
    71         int cancel_fd; 
    72 #ifdef HAVE_NSS 
    73         PRFileDesc *cancel_prfd; 
     41 
     42#ifndef CAMEL_OPERATION_CANCELLED 
     43#define CAMEL_OPERATION_CANCELLED (1<<0) 
    7444#endif 
    75 }; 
    76  
    77 #define CAMEL_OPERATION_CANCELLED (1<<0) 
    7845#define CAMEL_OPERATION_TRANSIENT (1<<1) 
    7946 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/camel-lite/camel/camel-operation.h

    r2950 r3429  
    2323#define CAMEL_OPERATION_H 1 
    2424 
     25#include <pthread.h> 
     26#include <stdio.h> 
     27#include <unistd.h> 
     28#include <sys/time.h> 
     29 
     30 
     31#include <glib.h> 
     32 
     33#include <libedataserver/e-msgport.h> 
     34 
     35#ifdef HAVE_NSS 
     36#include <nspr.h> 
     37#endif 
     38 
    2539G_BEGIN_DECLS 
    2640 
     
    3044 
    3145typedef void (*CamelOperationStatusFunc)(struct _CamelOperation *op, const char *what, int sofar, int oftotal, void *data); 
     46 
     47#ifndef CAMEL_OPERATION_CANCELLED 
     48#define CAMEL_OPERATION_CANCELLED (1<<0) 
     49#endif 
     50 
     51 
     52struct _CamelOperation { 
     53        struct _CamelOperation *next; 
     54        struct _CamelOperation *prev; 
     55 
     56        pthread_t id;           /* id of running thread */ 
     57        guint32 flags;          /* cancelled ? */ 
     58        int blocked;            /* cancellation blocked depth */ 
     59        int refcount; 
     60 
     61        CamelOperationStatusFunc status; 
     62        void *status_data; 
     63        unsigned int status_update; 
     64 
     65        /* stack of status messages (struct _status_stack *) */ 
     66        GSList *status_stack; 
     67        struct _status_stack *lastreport; 
     68 
     69        EMsgPort *cancel_port; 
     70        int cancel_fd; 
     71#ifdef HAVE_NSS 
     72        PRFileDesc *cancel_prfd; 
     73#endif 
     74}; 
    3275 
    3376typedef enum _camel_operation_status_t { 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-command.c

    r3280 r3429  
    370370 
    371371 
    372                 camel_imap_recon (store, &mex); 
     372                camel_imap_recon (store, &mex, FALSE); 
    373373                imap_debug ("Recon in start: %s\n", camel_exception_get_description (&mex)); 
    374374 
     
    412412                        camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, 
    413413                                             _("Operation cancelled")); 
    414                         camel_imap_recon (store, &mex); 
     414                        camel_imap_recon (store, &mex, TRUE); 
    415415                        imap_debug ("Recon in cont: %s\n", camel_exception_get_description (&mex)); 
    416416                        CAMEL_SERVICE_REC_UNLOCK (store, connect_lock); 
     
    711711                                        camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, 
    712712                                                             _("Operation cancelled")); 
    713                                         camel_imap_recon (store, &mex); 
     713                                        camel_imap_recon (store, &mex, TRUE); 
    714714                                        imap_debug ("Recon in untagged: %s\n", camel_exception_get_description (&mex)); 
    715715                                        camel_exception_clear (&mex); 
     
    731731                                camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, 
    732732                                                     _("Operation cancelled")); 
    733                                 camel_imap_recon (store, &mex); 
     733                                camel_imap_recon (store, &mex, TRUE); 
    734734                                imap_debug ("Recon in untagged idle: %s\n", camel_exception_get_description (&mex)); 
    735735                                camel_exception_clear (&mex); 
     
    876876                                        camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, 
    877877                                                             _("Operation cancelled")); 
    878                                         camel_imap_recon (store, &mex); 
     878                                        camel_imap_recon (store, &mex, TRUE); 
    879879                                        imap_debug ("Recon in untagged: %s\n", camel_exception_get_description (&mex)); 
    880880                                        camel_exception_clear (&mex); 
     
    896896                                camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, 
    897897                                                     _("Operation cancelled")); 
    898                                 camel_imap_recon (store, &mex); 
     898                                camel_imap_recon (store, &mex, TRUE); 
    899899                                imap_debug ("Recon in untagged idle: %s\n", camel_exception_get_description (&mex)); 
    900900                                camel_exception_clear (&mex); 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c

    r3398 r3429  
    160160 
    161161void 
    162 camel_imap_recon (CamelImapStore *store, CamelException *mex
     162camel_imap_recon (CamelImapStore *store, CamelException *mex, gboolean was_cancel
    163163{ 
    164164        if (store->not_recon) { 
    165165                camel_exception_set (mex, CAMEL_EXCEPTION_SERVICE_LOST_CONNECTION, 
    166166                        _("Connection lost during operation")); 
    167                 return; 
    168167        } else { 
    169168                CamelService *service = CAMEL_SERVICE (store); 
     
    195194 
    196195                service->reconnecting = FALSE; 
     196        } 
     197 
     198        if (was_cancel) { 
     199                CamelOperation *cc = camel_operation_registered (); 
     200                errno = EINTR; 
     201                cc->flags |= CAMEL_OPERATION_CANCELLED; 
     202                camel_operation_unref (cc); 
    197203        } 
    198204} 
     
    42124218                        CamelException mex = CAMEL_EXCEPTION_INITIALISER; 
    42134219                        camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled")); 
    4214                         camel_imap_recon (store, &mex); 
     4220                        camel_imap_recon (store, &mex, TRUE); 
    42154221                        imap_debug ("Recon: %s\n", camel_exception_get_description (&mex)); 
    42164222                        camel_exception_clear (&mex); 
     
    42884294                        CamelException mex = CAMEL_EXCEPTION_INITIALISER; 
    42894295                        camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled")); 
    4290                         camel_imap_recon (store, &mex); 
     4296                        camel_imap_recon (store, &mex, TRUE); 
    42914297                        imap_debug ("Recon in nl: %s\n", camel_exception_get_description (&mex)); 
    42924298                        camel_exception_clear (&mex); 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.h

    r3235 r3429  
    198198void camel_imap_store_stop_idle (CamelImapStore *store); 
    199199void camel_imap_store_start_idle (CamelImapStore *store); 
    200 void camel_imap_recon (CamelImapStore *store, CamelException *mex); 
     200void camel_imap_recon (CamelImapStore *store, CamelException *mex, gboolean was_cancel); 
    201201 
    202202G_END_DECLS 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c

    r3296 r3429  
    928928        gint retry = 0; 
    929929        gboolean had_attachment = FALSE; 
     930        gboolean free_ex = FALSE; 
     931 
     932        if (!ex) { 
     933                free_ex = TRUE; 
     934                ex = camel_exception_new (); 
     935        }                
    930936 
    931937        if (!uid) 
    932                 return
     938                goto do_free_ex
    933939 
    934940        pop3_debug ("%s requested\n", uid); 
     
    952958                camel_object_unref (CAMEL_OBJECT (stream)); 
    953959 
    954                 return message
     960                goto do_free_ex
    955961        } 
    956962 
     
    959965                camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_UID_NOT_AVAILABLE, 
    960966                             _("This message is not currently available")); 
    961                 return NULL
     967                goto do_free_ex
    962968        } 
    963969 
     
    10281034 
    10291035                        g_static_rec_mutex_unlock (pop3_store->uidl_lock); 
    1030                         return NULL
     1036                        goto do_free_ex
    10311037                } 
    10321038        } 
     
    10411047 
    10421048                g_static_rec_mutex_unlock (pop3_store->uidl_lock); 
    1043                 return NULL
     1049                goto do_free_ex
    10441050        } 
    10451051 
     
    10541060                        g_static_rec_mutex_unlock (pop3_store->eng_lock); 
    10551061                        g_static_rec_mutex_unlock (pop3_store->uidl_lock); 
    1056                         return NULL
     1062                        goto do_free_ex
    10571063                } 
    10581064        } 
     
    11341140                    || (stream = camel_data_cache_add(pop3_store->cache, "cache", fi->uid, ex)) == NULL) { 
    11351141                        /* stream = camel_stream_mem_new(); */ 
    1136                         return NULL
     1142                        goto do_free_ex
    11371143                } 
    11381144 
     
    12441250                        camel_message_info_set_flags((CamelMessageInfo *) mi, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS); 
    12451251                camel_folder_summary_add (summary, (CamelMessageInfo *)mi); 
    1246         } if (mi) { 
     1252        } else if (mi) { 
    12471253                if (had_attachment) 
    12481254                        camel_message_info_set_flags((CamelMessageInfo *) mi, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS); 
     
    12611267        g_static_rec_mutex_unlock (pop3_store->uidl_lock); 
    12621268 
     1269 do_free_ex: 
     1270        if (free_ex) 
     1271                camel_exception_free (ex); 
    12631272        return message; 
    12641273} 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/tny-camel-mime-part.c

    r3388 r3429  
    11621162{ 
    11631163        TnyCamelMimePartPriv *priv = TNY_CAMEL_MIME_PART_GET_PRIVATE (self); 
    1164         g_mutex_lock (priv->part_lock); 
     1164        const gchar *tmp; 
     1165        gchar *filename = NULL; 
     1166        g_mutex_lock (priv->part_lock); 
     1167        tmp = camel_mime_part_get_filename (priv->part); 
     1168        if (tmp != NULL) 
     1169                filename = g_strdup (tmp); 
    11651170        camel_mime_part_set_disposition (priv->part, "purged"); 
     1171        if (filename) { 
     1172                camel_mime_part_set_filename (priv->part, filename); 
     1173                g_free (filename); 
     1174        } 
    11661175        g_mutex_unlock (priv->part_lock); 
    11671176        return; 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/tny-camel-send-queue-priv.h

    r2825 r3429  
    3636        gboolean do_continue, is_running; 
    3737        gboolean observer_attached; 
     38        gint pending_send_notifies; 
    3839}; 
    3940 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/tny-camel-send-queue.c

    r3304 r3429  
    7272 
    7373 
     74static void emit_queue_control_signals (TnySendQueue *self, guint signal_id); 
     75 
    7476static TnyFolder* 
    7577get_sentbox (TnySendQueue *self) 
     
    235237        } 
    236238 
     239        priv->pending_send_notifies--; 
     240        if (priv->pending_send_notifies == 0 && priv->thread == NULL) {          
     241                emit_queue_control_signals (self, TNY_SEND_QUEUE_STOP); 
     242        } 
     243 
    237244        g_object_unref (self); 
    238245} 
     
    264271                        while (!tny_iterator_is_done (iter)) 
    265272                        { 
     273                                TnyCamelSendQueuePriv *priv = TNY_CAMEL_SEND_QUEUE_GET_PRIVATE (self); 
    266274                                TnyHeader *cur = TNY_HEADER (tny_iterator_get_current (iter)); 
     275                                priv->pending_send_notifies++; 
    267276                                tny_folder_get_msg_async (sentbox, cur,  
    268277                                        on_msg_sent_get_msg, on_status,  
     
    290299        TnyCamelAccountPriv *apriv = NULL; 
    291300 
     301        if ((priv->pending_send_notifies > 0) && (info->signal_id == TNY_SEND_QUEUE_STOP)) 
     302                return FALSE; 
    292303        if (priv && priv->trans_account) 
    293304                apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (priv->trans_account); 
     
    11351146        priv->is_running = FALSE; 
    11361147        priv->thread = NULL; 
     1148        priv->pending_send_notifies = 0; 
    11371149 
    11381150        return; 
  • releases/v1.0/pre-releases/v0.0.8/libtinymail-camel/tny-camel-store-account.c

    r3414 r3429  
    19511951 
    19521952        if (!apriv->service) { 
    1953                 GError *err = NULL; 
    1954                 g_set_error (&err, TNY_SYSTEM_ERROR, TNY_SYSTEM_ERROR_MEMORY,  
    1955                         _("Internal error, account not ready")); 
    1956                 callback ((TnyCamelAccount *) self, TRUE, err, user_data); 
    1957                 g_error_free (err); 
     1953                if (callback) { 
     1954                        GError *err = NULL; 
     1955                        g_set_error (&err, TNY_SYSTEM_ERROR, TNY_SYSTEM_ERROR_MEMORY,  
     1956                                _("Internal error, account not ready")); 
     1957                        callback ((TnyCamelAccount *) self, TRUE, err, user_data); 
     1958                        g_error_free (err); 
     1959                } 
    19581960                return; 
    19591961        } 
  • releases/v1.0/pre-releases/v0.0.8/tests/functional/folder-lister.c

    r3315 r3429  
    1919#include <stdlib.h> 
    2020#include <glib.h> 
     21#include <gtk/gtk.h> 
    2122 
    2223#include <tny-list.h> 
     
    113114                recurse_folders (TNY_FOLDER_STORE (account), NULL); 
    114115 
     116        gtk_main(); 
     117 
    115118        g_object_unref (account); 
    116119        g_object_unref (iter); 
  • releases/v1.0/pre-releases/v0.0.8/tests/shared/account-store.c

    r3304 r3429  
    9999} 
    100100 
     101typedef struct { 
     102        GCond *condition; 
     103        GMutex *mutex; 
     104        gboolean had_callback; 
     105} SyncInfo; 
     106 
     107 
     108static void went_online (TnyCamelAccount *account, gboolean canceled, GError *err, gpointer user_data) 
     109{ 
     110        SyncInfo *info = (SyncInfo *) user_data; 
     111 
     112        g_mutex_lock (info->mutex); 
     113        g_cond_broadcast (info->condition); 
     114        info->had_callback = TRUE; 
     115        g_mutex_unlock (info->mutex); 
     116 
     117        return;  
     118} 
    101119 
    102120static void 
     
    116134                tny_camel_account_set_session (TNY_CAMEL_ACCOUNT (account), me->session); 
    117135                camel_session_set_online ((CamelSession*)me->session, me->force_online);  
    118                 tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (account), me->force_online, NULL, NULL); 
    119136 
    120137                tny_account_set_proto (account, "imap"); 
     
    126143                tny_account_set_pass_func (account, per_account_get_pass); 
    127144 
     145                if (me->force_online) { 
     146                        SyncInfo *info = g_slice_new (SyncInfo); 
     147 
     148                        info->mutex = g_mutex_new (); 
     149                        info->condition = g_cond_new (); 
     150                        info->had_callback = FALSE; 
     151 
     152                        tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (account), me->force_online, went_online, info); 
     153 
     154                        g_mutex_lock (info->mutex); 
     155                        if (!info->had_callback) 
     156                                g_cond_wait (info->condition, info->mutex); 
     157                        g_mutex_unlock (info->mutex); 
     158 
     159                        g_mutex_free (info->mutex); 
     160                        g_cond_free (info->condition); 
     161                        g_slice_free (SyncInfo, info); 
     162                } 
     163 
    128164                tny_list_prepend (list, (GObject*)account); 
    129165                g_object_unref (G_OBJECT (account)); 
     
    136172                tny_camel_account_set_session (TNY_CAMEL_ACCOUNT (account), me->session); 
    137173                camel_session_set_online ((CamelSession*)me->session, me->force_online);  
    138                 tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (account), me->force_online, NULL, NULL); 
    139174 
    140175                tny_account_set_proto (account, "something"); 
     
    145180                tny_account_set_forget_pass_func (account, per_account_forget_pass); 
    146181                tny_account_set_pass_func (account, per_account_get_pass); 
     182 
     183                if (me->force_online) { 
     184                        SyncInfo *info = g_slice_new (SyncInfo); 
     185 
     186                        info->mutex = g_mutex_new (); 
     187                        info->condition = g_cond_new (); 
     188                        info->had_callback = FALSE; 
     189 
     190                        tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (account), me->force_online, went_online, info); 
     191 
     192                        g_mutex_lock (info->mutex); 
     193                        if (!info->had_callback) 
     194                                g_cond_wait (info->condition, info->mutex); 
     195                        g_mutex_unlock (info->mutex); 
     196 
     197                        g_mutex_free (info->mutex); 
     198                        g_cond_free (info->condition); 
     199                        g_slice_free (SyncInfo, info); 
     200                } 
    147201 
    148202                tny_list_prepend (list, (GObject*)account);