[Pkg-telepathy-commits] [telepathy-mission-control-6] 218/280: delete_async: being asked to delete a nonexistent account is an error
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 28f6731e92a596eabea5c4975249d5927428f459
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Fri Nov 15 16:46:23 2013 +0000
delete_async: being asked to delete a nonexistent account is an error
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
---
src/mcd-account-manager-default.c | 9 ++-------
tests/twisted/dbus-account-plugin.c | 10 ++--------
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c
index 49f0407..fed283b 100644
--- a/src/mcd-account-manager-default.c
+++ b/src/mcd-account-manager-default.c
@@ -361,13 +361,8 @@ delete_async (McpAccountStorage *self,
task = g_task_new (amd, cancellable, callback, user_data);
- if (sa == NULL || sa->absent)
- {
- /* Apparently we never had this account anyway. The plugin API
- * considers this to be "success". */
- g_task_return_boolean (task, TRUE);
- goto finally;
- }
+ g_return_if_fail (sa != NULL);
+ g_return_if_fail (!sa->absent);
filename = account_file_in (g_get_user_data_dir (), account);
diff --git a/tests/twisted/dbus-account-plugin.c b/tests/twisted/dbus-account-plugin.c
index 455095f..c7c5dbd 100644
--- a/tests/twisted/dbus-account-plugin.c
+++ b/tests/twisted/dbus-account-plugin.c
@@ -916,14 +916,8 @@ test_dbus_account_plugin_delete_async (McpAccountStorage *storage,
DEBUG ("called");
- if (account == NULL || !self->active)
- {
- /* We were asked to delete an account we don't have. It's
- * a bit like success. */
- g_task_return_boolean (task, TRUE);
- g_object_unref (task);
- return;
- }
+ g_return_if_fail (self->active);
+ g_return_if_fail (account != NULL);
/* deletion used to be delayed, so the regression tests will expect this
* to happen - leave them unmodified for now */
--
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