2007-07-04 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Wed, 4 Jul 2007 12:51:40 +0000 (12:51 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Wed, 4 Jul 2007 12:51:40 +0000 (12:51 +0000)
* src/modest-tny-account.c: (on_connection_status_changed):
Commented out the call to modest_platform_connect_and_wait() because this
seems to always hang, and I would like to know if this is the only thing
that causes a hang when showing the connection dialog.
It is not very useful anyway.

pmo-trunk-r2562

ChangeLog2
src/modest-tny-account.c

index 02a1277..ff4b313 100644 (file)
@@ -1,5 +1,13 @@
 2007-07-04  Murray Cumming <murrayc@murrayc.com>
 
 2007-07-04  Murray Cumming <murrayc@murrayc.com>
 
+       * src/modest-tny-account.c: (on_connection_status_changed):
+       Commented out the call to modest_platform_connect_and_wait() because this 
+       seems to always hang, and I would like to know if this is the only thing 
+       that causes a hang when showing the connection dialog.
+       It is not very useful anyway.
+
+2007-07-04  Murray Cumming <murrayc@murrayc.com>
+
        * src/maemo/modest-msg-view-window.c:
        (modest_msg_view_window_select_next_message):
        
        * src/maemo/modest-msg-view-window.c:
        (modest_msg_view_window_select_next_message):
        
index aeb957f..33c8013 100644 (file)
@@ -167,7 +167,12 @@ on_connection_status_changed (TnyAccount *account, TnyConnectionStatus status, g
                 * because tinymail does not guarantee that this signal handler will be called 
                 * in the main thread.
                 */
                 * because tinymail does not guarantee that this signal handler will be called 
                 * in the main thread.
                 */
-               modest_platform_connect_and_wait (NULL);
+               /* TODO: Commented out (and setting offline instead), because this causes hangs, probably related to 
+                * our use of mainloops:
+                * modest_platform_connect_and_wait (NULL);
+                */
+                TnyDevice *device = modest_runtime_get_device ();
+                tny_device_force_offline (device);
        } else if (status == TNY_CONNECTION_STATUS_CONNECTED_BROKEN) {
                printf ("DEBUG: %s: Connection broken. Forcing TnyDevice offline.\n", 
                        __FUNCTION__);
        } else if (status == TNY_CONNECTION_STATUS_CONNECTED_BROKEN) {
                printf ("DEBUG: %s: Connection broken. Forcing TnyDevice offline.\n", 
                        __FUNCTION__);