From 54b92c02552c2d6f3192817941120e2904a065ca Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 5 Aug 2022 12:36:31 +0200 Subject: [PATCH] re-use `_auth_success()` instead of copying ... ... and forgetting to 1. clear the password cache and 2. print a message of what exactly happened ... Signed-off-by: Steffen Jaeckel --- src/auth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/auth.c b/src/auth.c index dd1e541..b41b313 100644 --- a/src/auth.c +++ b/src/auth.c @@ -1239,10 +1239,8 @@ static int _handle_sm(xmpp_conn_t *const conn, } strophe_free(conn->ctx, queue_element_free(conn->ctx, e)); } - conn->authenticated = 1; - - /* call connection handler */ - conn->conn_handler(conn, XMPP_CONN_CONNECT, 0, NULL, conn->userdata); + strophe_debug(conn->ctx, "xmpp", "Session resumed successfully."); + _auth_success(conn); } else if (strcmp(name, "failed") == 0) { name = NULL;