version 1.2.2.12, 2012/04/25 13:08:15
|
version 1.2.2.13, 2012/04/25 13:33:53
|
Line 230 thrSession(struct tagSession *sess)
|
Line 230 thrSession(struct tagSession *sess)
|
/* dispatch message type */ |
/* dispatch message type */ |
if (mqtt_srv_Dispatch(sess->sess_srv, sess)) |
if (mqtt_srv_Dispatch(sess->sess_srv, sess)) |
ioLIBERR(mqtt); |
ioLIBERR(mqtt); |
locKill ^= locKill; |
|
switch (hdr->mqtt_msg.type) { |
switch (hdr->mqtt_msg.type) { |
case MQTT_TYPE_CONNECT: |
case MQTT_TYPE_CONNECT: |
ioDEBUG(5, "Exec CONNECT session"); |
ioDEBUG(5, "Exec CONNECT session"); |
Line 240 thrSession(struct tagSession *sess)
|
Line 239 thrSession(struct tagSession *sess)
|
io_freeVar(v); |
io_freeVar(v); |
} else |
} else |
ioLIBERR(mqtt); |
ioLIBERR(mqtt); |
continue; | |
| SESS_LOCK; |
| TAILQ_REMOVE(&Sessions, sess, sess_node); |
| SESS_UNLOCK; |
| |
| locKill ^= locKill; |
| break; |
case MQTT_TYPE_DISCONNECT: |
case MQTT_TYPE_DISCONNECT: |
ioDEBUG(5, "Exec DISCONNECT session"); |
ioDEBUG(5, "Exec DISCONNECT session"); |
finiSession(sess); |
finiSession(sess); |
locKill = 42; | |
| SESS_LOCK; |
| TAILQ_REMOVE(&Sessions, sess, sess_node); |
| SESS_UNLOCK; |
| |
| locKill ^= locKill; |
continue; |
continue; |
case MQTT_TYPE_PUBLISH: |
case MQTT_TYPE_PUBLISH: |
ioDEBUG(5, "Exec PUBLISH topic QoS=%d", hdr->mqtt_msg.qos); |
ioDEBUG(5, "Exec PUBLISH topic QoS=%d", hdr->mqtt_msg.qos); |