mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
Code simplification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2051,8 +2051,11 @@ static void aji_pruneregister(struct aji_client *client)
|
||||
iks *removequery = iks_new("query");
|
||||
iks *removeitem = iks_new("item");
|
||||
iks *send = iks_make_iq(IKS_TYPE_GET, "http://jabber.org/protocol/disco#items");
|
||||
if (!client || !removeiq || !removequery || !removeitem || !send) {
|
||||
ast_log(LOG_ERROR, "Out of memory.\n");
|
||||
goto safeout;
|
||||
}
|
||||
|
||||
if (client && removeiq && removequery && removeitem && send) {
|
||||
iks_insert_node(removeiq, removequery);
|
||||
iks_insert_node(removequery, removeitem);
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&client->buddies, 1, {
|
||||
@@ -2079,9 +2082,8 @@ static void aji_pruneregister(struct aji_client *client)
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
});
|
||||
} else
|
||||
ast_log(LOG_ERROR, "Out of memory.\n");
|
||||
|
||||
safeout:
|
||||
iks_delete(removeiq);
|
||||
iks_delete(removequery);
|
||||
iks_delete(removeitem);
|
||||
|
Reference in New Issue
Block a user