version 1.1.2.12, 2011/12/09 09:53:54
|
version 1.1.2.13, 2011/12/09 11:46:48
|
Line 12 startSession(sched_task_t *task)
|
Line 12 startSession(sched_task_t *task)
|
mqtt_cb_t cbs[MQTT_TYPE_MAX + 1] = { 0 }; |
mqtt_cb_t cbs[MQTT_TYPE_MAX + 1] = { 0 }; |
mqtt_msg_t buf = { basebuf, sizeof basebuf }; |
mqtt_msg_t buf = { basebuf, sizeof basebuf }; |
mqtthdr_connflgs_t flg; |
mqtthdr_connflgs_t flg; |
|
mqtthdr_connack_t cack; |
int ret = 0; |
int ret = 0; |
struct timeval tv = { 0 }; |
struct timeval tv = { 0 }; |
u_short ka; |
u_short ka; |
Line 30 startSession(sched_task_t *task)
|
Line 31 startSession(sched_task_t *task)
|
errno, strerror(errno)); |
errno, strerror(errno)); |
goto end; |
goto end; |
} |
} |
flg = mqtt_readCONNECT(&buf, &ka, sess->sess_cid, sizeof sess->sess_cid, | cack = mqtt_readCONNECT(&buf, &ka, sess->sess_cid, sizeof sess->sess_cid, |
sess->sess_user, sizeof sess->sess_user, sess->sess_pass, sizeof sess->sess_pass, |
sess->sess_user, sizeof sess->sess_user, sess->sess_pass, sizeof sess->sess_pass, |
sess->sess_will.topic, sess->sess_will.msg); | &sess->sess_will.topic, &sess->sess_will.msg); |
if (flg.reserved) { | if (cack.reserved) { |
VERB(3) syslog(LOG_ERR, "Error:: in MQTT protocol #%d - %s", | VERB(3) syslog(LOG_ERR, "Error:: in MQTT protocol #%d - %s", mqtt_GetErrno(), mqtt_GetError()); |
mqtt_GetErrno(), mqtt_GetError()); | |
goto end; |
goto end; |
} |
} |
|
|