X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-platform.c;h=12181452e78c56ed70154945d60849166c7a3926;hb=266e59ba330fbca5c32475b5696ec2e28a99ede6;hp=39d916b8a4e4b5662756879a90ae2b1b85ed4d42;hpb=0b34d6e9ffaff49461275da95231e8fe76fe4bbd;p=modest diff --git a/src/hildon2/modest-platform.c b/src/hildon2/modest-platform.c index 39d916b..1218145 100644 --- a/src/hildon2/modest-platform.c +++ b/src/hildon2/modest-platform.c @@ -1925,17 +1925,14 @@ on_timeout_check_account_is_online(CheckAccountIdleData* data) { gboolean stop_trying = FALSE; g_return_val_if_fail (data && data->account, FALSE); - - printf ("DEBUG: %s: tny_account_get_connection_status()==%d\n", __FUNCTION__, - tny_account_get_connection_status (data->account)); - + if (data && data->account && /* We want to wait until TNY_CONNECTION_STATUS_INIT has changed to something else, * after which the account is likely to be usable, or never likely to be usable soon: */ (tny_account_get_connection_status (data->account) != TNY_CONNECTION_STATUS_INIT) ) { data->is_online = TRUE; - + stop_trying = TRUE; } else { /* Give up if we have tried too many times: */ @@ -1946,15 +1943,15 @@ on_timeout_check_account_is_online(CheckAccountIdleData* data) ++(data->count_tries); } } - + if (stop_trying) { /* Allow the function that requested this idle callback to continue: */ if (data->loop) g_main_loop_quit (data->loop); - + if (data->account) g_object_unref (data->account); - + return FALSE; /* Don't call this again. */ } else { return TRUE; /* Call this timeout callback again. */