summaryrefslogtreecommitdiff
path: root/src/search-channel.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-10-08 13:38:18 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-10-08 14:25:40 +0100
commitb9fb773989b6a879a7f7381d7c8a55ae6efbe236 (patch)
treeaaf84905e1f74a3da7c0ee281a3d77efe5cc303e /src/search-channel.c
parent3b61e42569f55eb78380848c80647ac0fb8d8bf4 (diff)
downloadtelepathy-gabble-b9fb773989b6a879a7f7381d7c8a55ae6efbe236.tar.gz
Search: clarify handling field request result
Coverity got upset that we might be passing a NULL query_node to parse_search_field_response(). Actually, we never do, but rearranging the code a bit makes this more explicit. Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'src/search-channel.c')
-rw-r--r--src/search-channel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/search-channel.c b/src/search-channel.c
index 0e88aac54..4fc6a29c1 100644
--- a/src/search-channel.c
+++ b/src/search-channel.c
@@ -363,6 +363,8 @@ parse_search_field_response (GabbleSearchChannel *chan,
GPtrArray *search_keys = NULL;
GError *e = NULL;
+ g_return_if_fail (query_node != NULL);
+
x_node = lm_message_node_get_child_with_namespace (query_node, "x",
NS_X_DATA);
@@ -420,16 +422,16 @@ query_reply_cb (GabbleConnection *conn,
"%s is broken: it replied to our <query> with an empty IQ",
chan->priv->server);
}
+ else
+ {
+ parse_search_field_response (chan, query_node);
+ }
if (err != NULL)
{
supported_field_discovery_failed (chan, err);
g_error_free (err);
}
- else
- {
- parse_search_field_response (chan, query_node);
- }
return LM_HANDLER_RESULT_REMOVE_MESSAGE;
}