diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/connection.c | 4 | ||||
-rw-r--r-- | src/xmpp/presence.c | 8 | ||||
-rw-r--r-- | src/xmpp/presence.h | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 10aedf26..c067b736 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -100,7 +100,7 @@ jabber_init(const int disable_tls) jabber_conn.ctx = NULL; jabber_conn.tls_disabled = disable_tls; jabber_conn.domain = NULL; - presence_init(); + presence_sub_requests_init(); caps_init(); available_resources = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)resource_destroy); @@ -327,7 +327,7 @@ _connection_free_session_data(void) { g_hash_table_remove_all(available_resources); chat_sessions_clear(); - presence_free_sub_requests(); + presence_clear_sub_requests(); } int diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 4f450f70..8a0e6611 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -61,7 +61,7 @@ static void _send_room_presence(xmpp_conn_t *conn, xmpp_stanza_t *presence); void _send_caps_request(char *node, char *caps_key, char *id, char *from); void -presence_init(void) +presence_sub_requests_init(void) { sub_requests_ac = autocomplete_new(); } @@ -141,6 +141,12 @@ presence_free_sub_requests(void) autocomplete_free(sub_requests_ac); } +void +presence_clear_sub_requests(void) +{ + autocomplete_clear(sub_requests_ac); +} + char * presence_sub_request_find(char * search_str) { diff --git a/src/xmpp/presence.h b/src/xmpp/presence.h index e3ede7f1..fa63d78e 100644 --- a/src/xmpp/presence.h +++ b/src/xmpp/presence.h @@ -23,8 +23,9 @@ #ifndef PRESENCE_H #define PRESENCE_H +void presence_sub_requests_init(void); void presence_add_handlers(void); -void presence_init(void); void presence_free_sub_requests(void); +void presence_clear_sub_requests(void); #endif |