Moved error handling logic to server_events

This commit is contained in:
James Booth
2014-01-28 22:37:50 +00:00
parent b231133f9b
commit 5afb296e67
8 changed files with 53 additions and 31 deletions

View File

@@ -224,18 +224,7 @@ _message_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
g_string_free(log_msg, TRUE);
// handle recipient not found ('from' contains a value and type is 'cancel')
if ((from != NULL) && ((type != NULL && (strcmp(type, "cancel") == 0)))) {
handle_recipient_not_found(from, err_msg);
// handle any other error from recipient
} else if (from != NULL) {
handle_recipient_error(from, err_msg);
// handle errors from no recipient
} else {
handle_error(err_msg);
}
handle_message_error(from, type, err_msg);
free(err_msg);