Added verify any

This commit is contained in:
James Booth
2015-05-24 19:23:38 +01:00
parent d84e50bccd
commit 0d1ba9500c
6 changed files with 55 additions and 2 deletions

View File

@@ -243,6 +243,26 @@ _stanzas_equal(XMPPStanza *first, XMPPStanza *second)
return 0;
}
int
stanza_verify_any(XMPPStanza *stanza)
{
if (!stanzas) {
return 0;
}
GList *curr = g_list_last(stanzas);
while (curr) {
XMPPStanza *curr_stanza = curr->data;
if (_stanzas_equal(curr_stanza, stanza) == 0) {
return 1;
}
curr = g_list_previous(curr);
}
return 0;
}
int
stanza_verify_last(XMPPStanza *stanza)
{