about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2013-01-07 20:24:04 +0200
committerDmitry Podgorny <pasis.ua@gmail.com>2013-01-07 20:24:04 +0200
commitd0ab292d73902f7fe5696436ccd64d913bdc8719 (patch)
tree943488c4e50d3d9ba90d03b205aad1425f429221 /src
parent5e8d9e942bc2de269fa6790c298b52a3b8dd765f (diff)
downloadprofani-tty-d0ab292d73902f7fe5696436ccd64d913bdc8719.tar.gz
jabber.c: added assert before reconnect_timer allocation
Development build will be terminated if reconnect_timer was allocated
previously and wasn't destroyed.
Diffstat (limited to 'src')
-rw-r--r--src/jabber.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jabber.c b/src/jabber.c
index 0452183d..3372f845 100644
--- a/src/jabber.c
+++ b/src/jabber.c
@@ -22,6 +22,7 @@
 
 #include <string.h>
 #include <stdlib.h>
+#include <assert.h>
 
 #include <strophe.h>
 
@@ -800,6 +801,7 @@ _connection_handler(xmpp_conn_t * const conn,
         } else if (jabber_conn.conn_status == JABBER_CONNECTED) {
             prof_handle_lost_connection();
             if (prefs_get_reconnect() != 0) {
+                assert(reconnect_timer == NULL);
                 reconnect_timer = g_timer_new();
             }
             xmpp_stop(ctx);