changeset 668:d0928694c81b

Small jb_disconnect() improvement
author Mikael Berthe <mikael@lilotux.net>
date Sat, 14 Jan 2006 11:02:13 +0100
parents 86bc3295a4db
children 2b87065270f3
files mcabber/src/jabglue.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/jabglue.c	Fri Jan 13 22:05:38 2006 +0100
+++ b/mcabber/src/jabglue.c	Sat Jan 14 11:02:13 2006 +0100
@@ -132,17 +132,17 @@
 {
   if (!jc) return;
 
-  // Announce it to  everyone else
-  jb_setstatus(offline, NULL, "");
-
-  // End the XML flow
-  jb_send_raw("</stream:stream>");
+  if (online) {
+    // Announce it to  everyone else
+    jb_setstatus(offline, NULL, "");
+    // End the XML flow
+    jb_send_raw("</stream:stream>");
+  }
 
   // Announce it to the user
   statehandler(jc, JCONN_STATE_OFF);
 
   jab_delete(jc);
-  //free(jc); XXX
   jc = NULL;
 }