summaryrefslogtreecommitdiff
path: root/limox.c
diff options
context:
space:
mode:
Diffstat (limited to 'limox.c')
-rw-r--r--limox.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/limox.c b/limox.c
index 123ca53..5bdaa7b 100644
--- a/limox.c
+++ b/limox.c
@@ -11,6 +11,7 @@
#include <gui.h>
#include <limox.h>
+#include <data.h>
// the state of limox
@@ -66,9 +67,9 @@ static int roster_handler(xmpp_conn_t *conn, xmpp_stanza_t *stanza,
for (xmpp_stanza_t* item = xmpp_stanza_get_children(query); item;
item = xmpp_stanza_get_next(item)) {
- gui_add_roster_item(xmpp_stanza_get_attribute(item, "jid"),
- xmpp_stanza_get_attribute(item, "subscription"),
- xmpp_stanza_get_attribute(item, "name"));
+ add_roster_item(xmpp_stanza_get_attribute(item, "jid"),
+ xmpp_stanza_get_attribute(item, "subscription"),
+ xmpp_stanza_get_attribute(item, "name"));
}
return 1;
@@ -207,7 +208,8 @@ void limox_disconnect(void) {
if (conn != NULL && xmpp_conn_is_connected(conn)) {
xmpp_disconnect(conn);
while (xmpp_conn_is_connected(conn)) {
- xmpp_run_once(ctx, 200);
+ xmpp_run_once(ctx, 200); // TODO avoid with additional
+ // state "disconnecting"
}
if (!xmpp_conn_release(conn)) {
printf("DEBUG: Could not free connection!\n");