Diff for /mqtt/src/mqttd_calls.c between versions 1.2.2.2 and 1.2.2.6

version 1.2.2.2, 2012/01/30 13:39:22 version 1.2.2.6, 2012/04/26 08:20:20
Line 118  cmdCONNECT(void *srv, void *arg) Line 118  cmdCONNECT(void *srv, void *arg)
         if (!sess)          if (!sess)
                 return -1;                  return -1;
   
        pthread_mutex_lock(&mtx_sess);        ioDEBUG(5, "Exec CONNECT session");
         SESS_LOCK;
         TAILQ_REMOVE(&Sessions, sess, sess_node);          TAILQ_REMOVE(&Sessions, sess, sess_node);
        pthread_mutex_unlock(&mtx_sess);        SESS_UNLOCK;
   
         if (call.FiniSessPUB)          if (call.FiniSessPUB)
                 call.FiniSessPUB(&cfg, pub, sess->sess_cid, sess->sess_user, "%");                  call.FiniSessPUB(&cfg, pub, sess->sess_cid, sess->sess_user, "%");
   
        pthread_mutex_lock(&sess->sess_mtx);        SESS_ELEM_LOCK(sess);
        while ((store = TAILQ_FIRST(&sess->sess_sndqueue))) {        while ((store = SLIST_FIRST(&sess->sess_subscr))) {
                TAILQ_REMOVE(&sess->sess_sndqueue, store, st_node);                SLIST_REMOVE_HEAD(&sess->sess_subscr, st_node);
   
                 if (store->st_subscr.sub_topic.msg_base)                  if (store->st_subscr.sub_topic.msg_base)
                         free(store->st_subscr.sub_topic.msg_base);                          free(store->st_subscr.sub_topic.msg_base);
Line 136  cmdCONNECT(void *srv, void *arg) Line 137  cmdCONNECT(void *srv, void *arg)
   
                 free(store);                  free(store);
         }          }
        pthread_mutex_unlock(&sess->sess_mtx);        SESS_ELEM_UNLOCK(sess);
   
         if (sess->sess_will.msg)          if (sess->sess_will.msg)
                 free(sess->sess_will.msg);                  free(sess->sess_will.msg);
Line 158  cmdDISCONNECT(void *srv, void *arg) Line 159  cmdDISCONNECT(void *srv, void *arg)
         if (!sess)          if (!sess)
                 return -1;                  return -1;
   
        pthread_mutex_lock(&mtx_sess);        ioDEBUG(5, "Exec DISCONNECT session");
         SESS_LOCK;
         TAILQ_REMOVE(&Sessions, sess, sess_node);          TAILQ_REMOVE(&Sessions, sess, sess_node);
        pthread_mutex_unlock(&mtx_sess);        SESS_UNLOCK;
   
         call.LOG(logg, "Session %s stopped from %s for user %s.\n", sess->sess_cid,           call.LOG(logg, "Session %s stopped from %s for user %s.\n", sess->sess_cid, 
                         sess->sess_addr, sess->sess_user);                          sess->sess_addr, sess->sess_user);

Removed from v.1.2.2.2  
changed lines
  Added in v.1.2.2.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>