Handle errors for /disco info requests
This commit is contained in:
@@ -400,7 +400,7 @@ caps_create(xmpp_stanza_t *query)
|
||||
}
|
||||
if (found) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
curr_identity = g_slist_next(curr_identity);
|
||||
}
|
||||
|
||||
|
||||
@@ -812,8 +812,18 @@ static int
|
||||
_disco_info_response_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
||||
void * const userdata)
|
||||
{
|
||||
log_debug("Received diso#info response");
|
||||
log_info("Received diso#info response");
|
||||
|
||||
const char *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM);
|
||||
const char *type = xmpp_stanza_get_type(stanza);
|
||||
|
||||
// handle error responses
|
||||
if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) {
|
||||
char *error_message = stanza_get_error_message(stanza);
|
||||
handle_disco_info_error(from, error_message);
|
||||
free(error_message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
xmpp_stanza_t *query = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_QUERY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user