summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-02-03 16:33:57 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2010-02-15 13:09:31 +0000
commit4dbb0722ae1192b91c96f080c690388fab157b64 (patch)
tree8eb33a1c47f1a247f81c36995bd94aeafc24b026 /plugins
parent6ab282886ec05e3b58a91f1dbba52e382d1afb63 (diff)
Use stanza_extract_errors() not stanza_to_gerror()
The latter has been removed in favour of the former.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gateways.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/plugins/gateways.c b/plugins/gateways.c
index e5699dcf..42b5be91 100644
--- a/plugins/gateways.c
+++ b/plugins/gateways.c
@@ -244,18 +244,8 @@ register_cb (GObject *porter,
reply = wocky_porter_send_iq_finish (WOCKY_PORTER (porter), result, &error);
- if (reply == NULL)
- goto finally;
-
- error = wocky_xmpp_stanza_to_gerror (reply); /* NULL on success */
- g_object_unref (reply);
-
-finally:
- if (error == NULL)
- {
- gabble_svc_gabble_plugin_gateways_return_from_register (context);
- }
- else
+ if (reply == NULL ||
+ wocky_xmpp_stanza_extract_errors (reply, NULL, &error, NULL, NULL))
{
GError *tp_error = NULL;
@@ -290,6 +280,13 @@ finally:
g_error_free (error);
g_error_free (tp_error);
}
+ else
+ {
+ gabble_svc_gabble_plugin_gateways_return_from_register (context);
+ }
+
+ if (reply != NULL)
+ g_object_unref (reply);
}
static void