[Pkg-telepathy-commits] [telepathy-mission-control-6] 125/280: Revert "Make sure to not delete() nor commit() and account deleted from storage"

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:13 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 71490fe5f17e66d8900cb12ce38506745b2bc539
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue Nov 12 15:37:13 2013 +0000

    Revert "Make sure to not delete() nor commit() and account deleted from storage"
    
    This reverts commit 6ebcb0f048fcf0107c6d7deb99a7f4717467561a.
---
 mission-control-plugins/account-storage.c | 5 +----
 src/mcd-account-manager.c                 | 2 +-
 src/mcd-account.c                         | 5 ++---
 src/mcd-storage.c                         | 7 ++-----
 src/mcd-storage.h                         | 6 +-----
 5 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/mission-control-plugins/account-storage.c b/mission-control-plugins/account-storage.c
index dd478d8..a5b89f0 100644
--- a/mission-control-plugins/account-storage.c
+++ b/mission-control-plugins/account-storage.c
@@ -261,11 +261,8 @@ class_init (gpointer klass,
    * Emitted if an external entity deletes an account
    * in the backend the emitting plugin handles.
    *
-   * Should not be fired until mcp_account_storage_ready() has been called.
+   * Should not be fired until mcp_account_storage_ready() has been called
    *
-   * mcp_account_storage_commit() and mcp_account_storage_delete() won't be
-   * called for this account, it is assumed that the storage backend already
-   * deleted all the related information.
    */
   signals[DELETED] = g_signal_new ("deleted",
       type, G_SIGNAL_RUN_LAST, 0, NULL, NULL,
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 8495d44..822058a 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -569,7 +569,7 @@ on_account_removed (McdAccount *account, McdAccountManager *account_manager)
     name = mcd_account_get_unique_name (account);
     g_hash_table_remove (priv->accounts, name);
 
-    mcd_storage_delete_account (storage, name, MCD_DBUS_PROP_SET_FLAG_NONE);
+    mcd_storage_delete_account (storage, name);
     mcd_account_manager_write_conf_async (account_manager, account, NULL,
                                           NULL);
 }
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 12e1513..752e926 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -733,7 +733,7 @@ mcd_account_delete (McdAccount *account,
         return;
     }
 
-    mcd_storage_delete_account (priv->storage, name, flags);
+    mcd_storage_delete_account (priv->storage, name);
 
     data_dir_str = get_old_account_data_path (priv);
 
@@ -760,8 +760,7 @@ mcd_account_delete (McdAccount *account,
         g_free (data_dir_str);
     }
 
-    if ((flags & MCD_DBUS_PROP_SET_FLAG_ALREADY_IN_STORAGE) == 0)
-      mcd_storage_commit (priv->storage, name);
+    mcd_storage_commit (priv->storage, name);
 
     if (callback != NULL)
         callback (account, NULL, user_data);
diff --git a/src/mcd-storage.c b/src/mcd-storage.c
index f83f1b4..37b1c26 100644
--- a/src/mcd-storage.c
+++ b/src/mcd-storage.c
@@ -1971,8 +1971,7 @@ mcd_storage_create_account (McdStorage *self,
  */
 void
 mcd_storage_delete_account (McdStorage *self,
-    const gchar *account,
-    McdDBusPropSetFlags flags)
+    const gchar *account)
 {
   McpAccountManager *ma = MCP_ACCOUNT_MANAGER (self);
   McdStorageAccount *sa;
@@ -1983,9 +1982,7 @@ mcd_storage_delete_account (McdStorage *self,
   sa = lookup_account (self, account);
   g_return_if_fail (sa != NULL);
 
-  if ((flags & MCD_DBUS_PROP_SET_FLAG_ALREADY_IN_STORAGE) == 0)
-    mcp_account_storage_delete (sa->storage, ma, account, NULL);
-
+  mcp_account_storage_delete (sa->storage, ma, account, NULL);
   g_hash_table_remove (self->accounts, account);
 }
 
diff --git a/src/mcd-storage.h b/src/mcd-storage.h
index 0ea52eb..eb2ce36 100644
--- a/src/mcd-storage.h
+++ b/src/mcd-storage.h
@@ -22,8 +22,6 @@
 #include <glib-object.h>
 #include <mission-control-plugins/mission-control-plugins.h>
 
-#include <src/mcd-dbusprop.h>
-
 #ifndef MCD_STORAGE_H
 #define MCD_STORAGE_H
 
@@ -99,9 +97,7 @@ gchar *mcd_storage_create_account (McdStorage *storage,
     const gchar *identification,
     GError **error);
 
-void mcd_storage_delete_account (McdStorage *storage,
-    const gchar *account,
-    McdDBusPropSetFlags flags);
+void mcd_storage_delete_account (McdStorage *storage, const gchar *account);
 
 void mcd_storage_commit (McdStorage *storage, const gchar *account);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list