From f80b2889ec1b5eba9719e5aed16f435ae8fde5f9 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 30 Jan 2020 11:54:03 +0100 Subject: [PATCH] Fix error in stanza_get_oldest_delay() Introduced in bf2e09feee1697c570fcfb9e1e44a8ec991bd196. --- src/xmpp/stanza.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c index e75bbd6e..9c6aecb6 100644 --- a/src/xmpp/stanza.c +++ b/src/xmpp/stanza.c @@ -1254,7 +1254,7 @@ stanza_get_delay_from(xmpp_stanza_t *const stanza, gchar *from) } if (delay) { - return _stanza_get_delay_timestamp_xep0203(stanza); + return _stanza_get_delay_timestamp_xep0203(delay); } // otherwise check for XEP-0091 legacy delayed delivery @@ -1284,14 +1284,14 @@ stanza_get_oldest_delay(xmpp_stanza_t *const stanza) child_name = xmpp_stanza_get_name(child); if (child_name && strcmp(child_name, STANZA_NAME_DELAY) == 0) { - GDateTime *tmp = _stanza_get_delay_timestamp_xep0203(stanza); + GDateTime *tmp = _stanza_get_delay_timestamp_xep0203(child); if (!oldest || g_date_time_compare(oldest, tmp) == 1) oldest = tmp; } if (child_name && strcmp(child_name, STANZA_NAME_X) == 0) { - GDateTime *tmp = _stanza_get_delay_timestamp_xep0091(stanza); + GDateTime *tmp = _stanza_get_delay_timestamp_xep0091(child); if (!oldest || g_date_time_compare(oldest, tmp) == 1) oldest = tmp;