version 1.1.2.10, 2011/12/08 14:52:47
|
version 1.1.2.11, 2011/12/08 17:02:25
|
Line 1
|
Line 1
|
#include "global.h" |
#include "global.h" |
|
#include "mqttd.h" |
|
|
|
|
extern char cliCmd[], *cliStr[]; |
extern char cliCmd[], *cliStr[]; |
Line 7 extern char cliCmd[], *cliStr[];
|
Line 8 extern char cliCmd[], *cliStr[];
|
static void * |
static void * |
startSession(sched_task_t *task) |
startSession(sched_task_t *task) |
{ |
{ |
static u_char basebuf[USHRT_MAX]; | u_char basebuf[USHRT_MAX]; |
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; |
int ret = 0; |
int ret = 0; |
struct timeval tv = { 0 }; |
struct timeval tv = { 0 }; |
Line 32 startSession(sched_task_t *task)
|
Line 33 startSession(sched_task_t *task)
|
goto end; |
goto end; |
} |
} |
|
|
|
/* |
flg = mqtt_readCONNECT(buf, &ka, ); |
flg = mqtt_readCONNECT(buf, &ka, ); |
if (flg.reserved) { |
if (flg.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; |
} | } */ |
|
|
/* |
/* |
for (ret = i = 0; cliCmd[i] && !(ret = (hdr->mqtt_msg.type == cliCmd[i])); i++); |
for (ret = i = 0; cliCmd[i] && !(ret = (hdr->mqtt_msg.type == cliCmd[i])); i++); |