diff options
author | James Booth <boothj5@gmail.com> | 2015-06-05 23:02:56 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-06-05 23:02:56 +0100 |
commit | 9aff8abd2ed405e2790bb3918834ef501542d4f5 (patch) | |
tree | f78d54491b01c2c8d259f37459ad2229e6919d71 /src/xmpp | |
parent | a3693cfbe744c6ba8274b56a437f1faaaad414bf (diff) | |
parent | ae4e07ad87968072893b58c2ee778b52fc3059da (diff) | |
download | profani-tty-9aff8abd2ed405e2790bb3918834ef501542d4f5.tar.gz |
Merge branch 'master' into openpgp
Conflicts: .travis.yml
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 80b680b0..26122d51 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); |