2007-05-31 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Thu, 31 May 2007 17:58:57 +0000 (17:58 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Thu, 31 May 2007 17:58:57 +0000 (17:58 +0000)
* src/maemo/modest-main-window.c:
        (on_account_store_connecting_finished): Do not try to get the
        connection ID if we are not really connected. I am surprised that
        this signal handler is called when we are not connected.

pmo-trunk-r2021

ChangeLog2
src/maemo/modest-main-window.c

index 2484cf2..2b8ba9a 100644 (file)
@@ -1,5 +1,12 @@
 2007-05-31  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/maemo/modest-main-window.c:
+       (on_account_store_connecting_finished): Do not try to get the 
+       connection ID if we are not really connected. I am surprised that 
+       this signal handler is called when we are not connected.
+
+2007-05-31  Murray Cumming  <murrayc@murrayc.com>
+
        * src/modest-error.h: 
        * src/modest-ui-actions.c:
        (modest_ui_actions_get_msgs_full_error_handler):
index 042d76b..58c2495 100644 (file)
@@ -388,6 +388,13 @@ on_account_store_connecting_finished (TnyAccountStore *store, ModestMainWindow *
         * (without the check for >0 accounts, though that is not specified): */
 
        TnyDevice *device = tny_account_store_get_device (store);
+       
+       /* Check that we are really online.
+        * This signal should not be emitted when we are not connected, 
+        * but it seems to happen sometimes: */
+        if (!tny_device_is_online (device))
+               return;
+               
        const gchar *iap_id = tny_maemo_conic_device_get_current_iap_id (TNY_MAEMO_CONIC_DEVICE (device));
        printf ("DEBUG: %s: connection id=%s\n", __FUNCTION__, iap_id);