From a0aa26b6fa65ba625f4a6d3495a345c7120ff16d Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 27 Dec 2022 22:53:18 +0100 Subject: add `now` option to `/reconnect` command Signed-off-by: Steffen Jaeckel --- src/xmpp/session.c | 10 ++++------ src/xmpp/session.h | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/xmpp') diff --git a/src/xmpp/session.c b/src/xmpp/session.c index 3bec1ab2..892cbbf2 100644 --- a/src/xmpp/session.c +++ b/src/xmpp/session.c @@ -96,8 +96,6 @@ static activity_state_t activity_state; static resource_presence_t saved_presence; static char* saved_status; -static void _session_reconnect(void); - static void _session_free_internals(void); static void _session_free_saved_details(void); @@ -268,12 +266,12 @@ session_process_events(void) if ((reconnect_sec != 0) && reconnect_timer) { int elapsed_sec = g_timer_elapsed(reconnect_timer, NULL); if (elapsed_sec > reconnect_sec) { - _session_reconnect(); + session_reconnect_now(); } } break; case JABBER_RECONNECT: - _session_reconnect(); + session_reconnect_now(); break; default: break; @@ -557,8 +555,8 @@ session_reconnect(gchar* altdomain, unsigned short altport) reconnect.altport = altport; } -static void -_session_reconnect(void) +void +session_reconnect_now(void) { // reconnect with account. ProfAccount* account = accounts_get_account(saved_account.name); diff --git a/src/xmpp/session.h b/src/xmpp/session.h index d8565fa4..e6facb93 100644 --- a/src/xmpp/session.h +++ b/src/xmpp/session.h @@ -47,5 +47,6 @@ void session_init_activity(void); void session_check_autoaway(void); void session_reconnect(gchar* altdomain, unsigned short altport); +void session_reconnect_now(void); #endif -- cgit 1.4.1-2-gfad0 nge'>range