mcabber/src/jabglue.c
changeset 668 d0928694c81b
parent 655 de6837908702
child 671 c5da36fd437a
equal deleted inserted replaced
667:86bc3295a4db 668:d0928694c81b
   130 
   130 
   131 void jb_disconnect(void)
   131 void jb_disconnect(void)
   132 {
   132 {
   133   if (!jc) return;
   133   if (!jc) return;
   134 
   134 
   135   // Announce it to  everyone else
   135   if (online) {
   136   jb_setstatus(offline, NULL, "");
   136     // Announce it to  everyone else
   137 
   137     jb_setstatus(offline, NULL, "");
   138   // End the XML flow
   138     // End the XML flow
   139   jb_send_raw("</stream:stream>");
   139     jb_send_raw("</stream:stream>");
       
   140   }
   140 
   141 
   141   // Announce it to the user
   142   // Announce it to the user
   142   statehandler(jc, JCONN_STATE_OFF);
   143   statehandler(jc, JCONN_STATE_OFF);
   143 
   144 
   144   jab_delete(jc);
   145   jab_delete(jc);
   145   //free(jc); XXX
       
   146   jc = NULL;
   146   jc = NULL;
   147 }
   147 }
   148 
   148 
   149 inline void jb_reset_keepalive()
   149 inline void jb_reset_keepalive()
   150 {
   150 {