diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-02-22 16:25:55 -0500 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-02-22 16:25:55 -0500 |
commit | 4ee285565ef75a1b75859eab53c2fa82c986bc92 (patch) | |
tree | cee4815d14dc224b6024a57dd9e4823bbbd81b94 /src/conn-mail-notif.c | |
parent | 61d654a21cdd76b3032dce4bf38dbcfff8ccb1ec (diff) |
MailNotification.Unsubscribe now returns NotAvailable error
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Diffstat (limited to 'src/conn-mail-notif.c')
-rw-r--r-- | src/conn-mail-notif.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/conn-mail-notif.c b/src/conn-mail-notif.c index 0d57e128..3316f2b4 100644 --- a/src/conn-mail-notif.c +++ b/src/conn-mail-notif.c @@ -197,13 +197,17 @@ gabble_mail_notification_unsubscribe (GabbleSvcConnectionInterfaceMailNotificati if (!g_hash_table_lookup_extended (conn->mail_subscribers, sender, NULL, NULL)) { + GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "Not subscribed" }; + DEBUG ("Sender '%s' is not subscribed!", sender); - goto done; + + dbus_g_method_return_error (context, &e); + g_free (sender); + return; } unsubscribe (conn, sender, FALSE); -done: g_free (sender); gabble_svc_connection_interface_mail_notification_return_from_unsubscribe (context); } |