Changeset 2629

Show
Ignore:
Timestamp:
08/14/07 18:53:22
Author:
murrayc
Message:

2007-08-14 Murray Cumming <murrayc@murrayc.com>

* libtinymail-maemo/tny-maemo-conic-device.c:
(tny_maemo_conic_device_instance_init): Initialize is_online before
forcing the on_connection_event() signal handler to be called, not after,
which could explain why is_online sometimes seems to be false at the start
when it should not be.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r2628 r2629  
     12007-08-14  Murray Cumming  <murrayc@murrayc.com> 
     2 
     3        * libtinymail-maemo/tny-maemo-conic-device.c: 
     4        (tny_maemo_conic_device_instance_init): Initialize is_online before  
     5        forcing the on_connection_event() signal handler to be called, not after, 
     6        which could explain why is_online sometimes seems to be false at the start  
     7        when it should not be. 
     8 
    192007-08-14  Murray Cumming  <murrayc@murrayc.com> 
    210 
  • trunk/libtinymail-maemo/tny-maemo-conic-device.c

    r2627 r2629  
    383383#ifdef MAEMO_CONIC_DUMMY 
    384384 
    385 static gboolean on_dummy_connection_check (gpointer user_data) 
     385static gboolean 
     386on_dummy_connection_check (gpointer user_data) 
    386387{ 
    387388        TnyMaemoConicDevice *self = NULL; 
     
    667668        TnyMaemoConicDevicePriv *priv = TNY_MAEMO_CONIC_DEVICE_GET_PRIVATE (self); 
    668669        priv->iap = NULL; 
     670        priv->is_online = FALSE;  
    669671         
    670672        #ifndef MAEMO_CONIC_DUMMY 
     
    684686        g_signal_connect (priv->cnx, "connection-event", 
    685687                          G_CALLBACK(on_connection_event), self); 
    686  
     688         
    687689        /* 
    688          * this will get us in connected state only if there is already a connection. 
    689          * thus, this will setup our state correctly when we receive the signals 
     690         * This will get us in connected state only if there is already a connection. 
     691         * thus, this will setup our state correctly when we receive the signals. 
    690692         */ 
    691693        if (!con_ic_connection_connect (priv->cnx, CON_IC_CONNECT_FLAG_AUTOMATICALLY_TRIGGERED)) 
     
    694696        #endif /* MAEMO_CONIC_DUMMY */ 
    695697         
    696         priv->is_online     = FALSE;  
     698        /* We should not have a real is_online, based on what libconic has told us: */ 
    697699        priv->forced = FALSE; 
    698700