[telepathy-gabble/telepathy-gabble-0.8] Clarify vCard get error processing
Will Thompson
will.thompson at collabora.co.uk
Mon Sep 28 07:51:41 PDT 2009
---
src/vcard-manager.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/vcard-manager.c b/src/vcard-manager.c
index 094a4d5..dd2e4cd 100644
--- a/src/vcard-manager.c
+++ b/src/vcard-manager.c
@@ -1083,29 +1083,28 @@ pipeline_reply_cb (GabbleConnection *conn,
/* First, handle the error "wait": suspend the request and replay it
* later */
LmMessageNode *error_node = NULL;
+ GabbleXmppError xmpp_error = XMPP_ERROR_UNDEFINED_CONDITION;
GabbleXmppErrorType error_type = XMPP_ERROR_UNDEFINED_CONDITION;
if (reply_msg != NULL)
- {
- error_node = lm_message_node_get_child (reply_msg->node, "error");
- if (error_node != NULL)
- {
- gabble_xmpp_error_from_node (error_node, &error_type);
- }
- }
+ error_node = lm_message_node_get_child (reply_msg->node, "error");
+
+ if (error_node != NULL)
+ xmpp_error = gabble_xmpp_error_from_node (error_node, &error_type);
/* FIXME: move this code into error.c */
- if (error_node != NULL && error_type == XMPP_ERROR_TYPE_WAIT)
+ if (error_type == XMPP_ERROR_TYPE_WAIT)
{
DEBUG ("Cannot get <%u>'s vCard now: the server returned the "
"temporary error '%s'. Suspend the request.",
- entry->handle,
- gabble_xmpp_error_string (
- gabble_xmpp_error_from_node (error_node, &error_type)));
+ entry->handle, gabble_xmpp_error_string (xmpp_error));
+
g_source_remove (request->timer_id);
request->timer_id = 0;
+
entry->suspended_timer_id = g_timeout_add_seconds (
request_wait_delay, suspended_request_timeout_cb, request);
+
return;
}
--
1.5.6.5
More information about the telepathy-commits
mailing list