mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Fix stanza_get_child_by_name_and_from() strcmp
Fix https://github.com/profanity-im/profanity/issues/1227
This commit is contained in:
parent
46fd7150e5
commit
548b64f6c5
@ -1177,9 +1177,11 @@ stanza_get_child_by_name_and_from(xmpp_stanza_t * const stanza, const char * con
|
||||
{
|
||||
xmpp_stanza_t *child;
|
||||
const char *child_from;
|
||||
const char *child_name;
|
||||
|
||||
for (child = xmpp_stanza_get_children(stanza); child; child = xmpp_stanza_get_next(child)) {
|
||||
if (strcmp(name, xmpp_stanza_get_name(child)) == 0) {
|
||||
child_name = xmpp_stanza_get_name(child);
|
||||
if (child_name && strcmp(name, child_name) == 0) {
|
||||
child_from = xmpp_stanza_get_attribute(child, STANZA_ATTR_FROM);
|
||||
if (child_from && strcmp(from, child_from) == 0) {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user