2007-04-17 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Tue, 17 Apr 2007 13:53:46 +0000 (13:53 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Tue, 17 Apr 2007 13:53:46 +0000 (13:53 +0000)
* src/maemo/modest-account-settings-dialog.c: (check_data): Always return something,
        found by valgrind.
        * src/modest-tny-account-store.c: (account_list_free),
        (on_account_changed): Add a TODO comment about a valgrind error, caused by using
        cursor->data after unreffing it. But there is some strange stuff there so it might not be
        easy to fix.

pmo-trunk-r1573

ChangeLog2
src/maemo/modest-account-settings-dialog.c
src/modest-tny-account-store.c

index a921a76..dcd4b74 100644 (file)
@@ -1,5 +1,14 @@
 2007-04-17  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/maemo/modest-account-settings-dialog.c: (check_data): Always return something, 
+       found by valgrind.
+       * src/modest-tny-account-store.c: (account_list_free),
+       (on_account_changed): Add a TODO comment about a valgrind error, caused by using 
+       cursor->data after unreffing it. But there is some strange stuff there so it might not be 
+       easy to fix.
+
+2007-04-17  Murray Cumming  <murrayc@murrayc.com>
+
        * src/modest-protocol-info.c:
        * src/modest-protocol-info.h: Added a MODEST_PROTOCOL_AUTH_CRAMMD5 enum value, because it 
        is required by our UI spec. Maybe something in our implementation will use this eventually.
index e487d8a..58e5484 100644 (file)
@@ -611,6 +611,8 @@ check_data (ModestAccountSettingsDialog *self)
        /* TODO: The UI Spec wants us to check that the servernames are valid, 
         * but does not specify how.
         */
+        
+       return TRUE;
 }
 /*
  */
index a48682f..76a9f2a 100644 (file)
@@ -181,6 +181,9 @@ account_list_free (GSList *accounts)
        GSList *cursor = accounts;
 
        while (cursor) {
+               /* TODO: This uses cursor->data after causing it to be freed,
+                * as valgrind shows.
+                * It's not clear what is being attempted here. murrayc */
                g_object_unref (G_OBJECT(cursor->data));
                if (G_IS_OBJECT(cursor->data)) { /* check twice... */
                        const gchar *id = tny_account_get_id(TNY_ACCOUNT(cursor->data));
@@ -225,11 +228,15 @@ on_account_changed (ModestAccountMgr *acc_mgr, const gchar *account, gboolean se
        /* FIXME: make this more finegrained; changes do not really affect _all_
         * accounts, and some do not affect tny accounts at all (such as 'last_update')
         */
-       account_list_free (priv->store_accounts);
-       priv->store_accounts = NULL;
+       if (priv->store_accounts) {
+               account_list_free (priv->store_accounts);
+               priv->store_accounts = NULL;
+       }
        
-       account_list_free (priv->transport_accounts);
-       priv->transport_accounts = NULL;
+       if (priv->transport_accounts) {
+               account_list_free (priv->transport_accounts);
+               priv->transport_accounts = NULL;
+       }
 
        g_signal_emit (G_OBJECT(self), signals[ACCOUNT_UPDATE_SIGNAL], 0,
                       account);