Replace stanza_get_child_by_name_and_ns with xmpp_stanza_get_child_by_name_and_ns

Replace our own stanza_get_child_by_name_and_ns() with the upstreamed
xmpp_stanza_get_child_by_name_and_ns() provided by the new
libstrophe/libmesode 0.10.0.
This commit is contained in:
Michael Vetter
2020-09-30 19:34:00 +02:00
parent 0a9200e268
commit 17b1b431f5
6 changed files with 10 additions and 32 deletions

View File

@@ -2574,26 +2574,6 @@ _stanza_create_sha1_hash(char* str)
return b64;
}
xmpp_stanza_t*
stanza_get_child_by_name_and_ns(xmpp_stanza_t* const stanza, const char* const name, const char* const ns)
{
xmpp_stanza_t* child;
const char* child_ns;
const char* child_name;
for (child = xmpp_stanza_get_children(stanza); child; child = xmpp_stanza_get_next(child)) {
child_name = xmpp_stanza_get_name(child);
if (child_name && strcmp(name, child_name) == 0) {
child_ns = xmpp_stanza_get_ns(child);
if (child_ns && strcmp(ns, child_ns) == 0) {
break;
}
}
}
return child;
}
xmpp_stanza_t*
stanza_create_avatar_retrieve_data_request(xmpp_ctx_t* ctx, const char* stanza_id, const char* const item_id, const char* const jid)
{