From 055a5f71ce38c87ea1c97d475fd870ee25148ea9 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 5 Jan 2016 00:06:50 +0000 Subject: Added roster struct, create and destroy roster on connect/disconnect --- src/otr/otr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/otr') diff --git a/src/otr/otr.c b/src/otr/otr.c index 878f2edd..d898e740 100644 --- a/src/otr/otr.c +++ b/src/otr/otr.c @@ -84,9 +84,13 @@ cb_policy(void *opdata, ConnContext *context) } static int -cb_is_logged_in(void *opdata, const char *accountname, - const char *protocol, const char *recipient) +cb_is_logged_in(void *opdata, const char *accountname, const char *protocol, const char *recipient) { + jabber_conn_status_t conn_status = jabber_get_connection_status(); + if (conn_status != JABBER_CONNECTED) { + return PRESENCE_OFFLINE; + } + PContact contact = roster_get_contact(recipient); // not in roster -- cgit 1.4.1-2-gfad0