[Pkg-telepathy-commits] [telepathy-mission-control-6] 221/280: mcd_storage_commit: rely on never being called with account == NULL

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:26 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 9624c084d46660721aa0173e23103cd25165a5a5
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri Nov 15 17:33:28 2013 +0000

    mcd_storage_commit: rely on never being called with account == NULL
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
---
 src/mcd-storage.c | 26 +++++++-------------------
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/src/mcd-storage.c b/src/mcd-storage.c
index d3bc5da..cbca24e 100644
--- a/src/mcd-storage.c
+++ b/src/mcd-storage.c
@@ -1828,33 +1828,21 @@ mcd_storage_delete_account (McdStorage *self,
 void
 mcd_storage_commit (McdStorage *self, const gchar *account)
 {
-  GList *store;
   McpAccountManager *ma = MCP_ACCOUNT_MANAGER (self);
   McpAccountStorage *plugin;
   const gchar *pname;
 
   g_return_if_fail (MCD_IS_STORAGE (self));
+  g_return_if_fail (account != NULL);
 
-  if (account != NULL)
-    {
-      plugin = g_hash_table_lookup (self->accounts, account);
-      g_return_if_fail (plugin != NULL);
-
-      pname = mcp_account_storage_name (plugin);
-
-      DEBUG ("flushing plugin %s %s to long term storage", pname, account);
-      mcp_account_storage_commit (plugin, ma, account);
-      return;
-    }
+  plugin = g_hash_table_lookup (self->accounts, account);
+  g_return_if_fail (plugin != NULL);
 
-  for (store = stores; store != NULL; store = g_list_next (store))
-    {
-      plugin = store->data;
-      pname = mcp_account_storage_name (plugin);
+  pname = mcp_account_storage_name (plugin);
 
-      DEBUG ("flushing plugin %s to long term storage", pname);
-      mcp_account_storage_commit (plugin, ma, NULL);
-    }
+  /* FIXME: fd.o #29563: this should be async, really */
+  DEBUG ("flushing plugin %s %s to long term storage", pname, account);
+  mcp_account_storage_commit (plugin, ma, 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