From 2c5b44421e1b3a163ce33249f9d0b1567d411b16 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 17 May 2015 22:05:43 +0100 Subject: Added initial stabber test --- src/xmpp/connection.c | 9 +++++---- src/xmpp/xmpp.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/xmpp') diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 70d49b7c..8fa83144 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -194,7 +194,7 @@ jabber_disconnect(void) xmpp_disconnect(jabber_conn.conn); while (jabber_get_connection_status() == JABBER_DISCONNECTING) { - jabber_process_events(); + jabber_process_events(10); } _connection_free_saved_account(); _connection_free_saved_details(); @@ -222,10 +222,11 @@ jabber_shutdown(void) _connection_free_session_data(); xmpp_shutdown(); free(jabber_conn.log); + jabber_conn.log = NULL; } void -jabber_process_events(void) +jabber_process_events(int millis) { int reconnect_sec; @@ -234,7 +235,7 @@ jabber_process_events(void) case JABBER_CONNECTED: case JABBER_CONNECTING: case JABBER_DISCONNECTING: - xmpp_run_once(jabber_conn.ctx, 10); + xmpp_run_once(jabber_conn.ctx, millis); break; case JABBER_DISCONNECTED: reconnect_sec = prefs_get_reconnect(); @@ -577,4 +578,4 @@ _xmpp_get_file_logger() file_log->userdata = &level; return file_log; -} \ No newline at end of file +} diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 398c9f46..6b985b08 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -136,7 +136,7 @@ jabber_conn_status_t jabber_connect_with_details(const char * const jid, jabber_conn_status_t jabber_connect_with_account(const ProfAccount * const account); void jabber_disconnect(void); void jabber_shutdown(void); -void jabber_process_events(void); +void jabber_process_events(int millis); const char * jabber_get_fulljid(void); const char * jabber_get_domain(void); jabber_conn_status_t jabber_get_connection_status(void); -- cgit 1.4.1-2-gfad0