diff options
author | James Booth <boothj5@gmail.com> | 2015-05-17 22:05:43 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-05-17 22:05:43 +0100 |
commit | 2c5b44421e1b3a163ce33249f9d0b1567d411b16 (patch) | |
tree | 5ba771ddcc003ef7d86e9585c87dd4b11af44f5a /src/xmpp | |
parent | 97c5072f56b992d3bf2e4c3550a8010f9638b80a (diff) | |
download | profani-tty-2c5b44421e1b3a163ce33249f9d0b1567d411b16.tar.gz |
Added initial stabber test
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/connection.c | 9 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 2 |
2 files changed, 6 insertions, 5 deletions
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); |