version 1.2.2.32, 2012/05/22 14:15:04
|
version 1.2.2.33, 2012/05/27 10:04:05
|
Line 16 initSession(int sock, ait_val_t * __restrict v)
|
Line 16 initSession(int sock, ait_val_t * __restrict v)
|
if (!v) |
if (!v) |
return NULL; |
return NULL; |
|
|
sess = malloc(sizeof(struct tagSession)); | sess = io_malloc(sizeof(struct tagSession)); |
if (!sess) { |
if (!sess) { |
ioSYSERR(0); |
ioSYSERR(0); |
return NULL; |
return NULL; |
Line 34 initSession(int sock, ait_val_t * __restrict v)
|
Line 34 initSession(int sock, ait_val_t * __restrict v)
|
sess->sess_buf = mqtt_msgAlloc(USHRT_MAX); |
sess->sess_buf = mqtt_msgAlloc(USHRT_MAX); |
if (!sess->sess_buf) { |
if (!sess->sess_buf) { |
ioLIBERR(mqtt); |
ioLIBERR(mqtt); |
free(sess); | io_free(sess); |
return NULL; |
return NULL; |
} |
} |
|
|
Line 43 initSession(int sock, ait_val_t * __restrict v)
|
Line 43 initSession(int sock, ait_val_t * __restrict v)
|
if (!sess->sess_srv) { |
if (!sess->sess_srv) { |
ioDEBUG(3, "Error:: in srv_Init #%d - %s", mqtt_GetErrno(), mqtt_GetError()); |
ioDEBUG(3, "Error:: in srv_Init #%d - %s", mqtt_GetErrno(), mqtt_GetError()); |
mqtt_msgFree(&sess->sess_buf, 42); |
mqtt_msgFree(&sess->sess_buf, 42); |
free(sess); | io_free(sess); |
return NULL; |
return NULL; |
} else { |
} else { |
mqtt_srv_setCmd(sess->sess_srv, MQTT_TYPE_CONNECT, cmdCONNECT); |
mqtt_srv_setCmd(sess->sess_srv, MQTT_TYPE_CONNECT, cmdCONNECT); |
Line 87 finiSession(struct tagSession *sess)
|
Line 87 finiSession(struct tagSession *sess)
|
if (store->st_subscr.sub_value.msg_base) |
if (store->st_subscr.sub_value.msg_base) |
free(store->st_subscr.sub_value.msg_base); |
free(store->st_subscr.sub_value.msg_base); |
|
|
free(store); | io_free(store); |
} |
} |
|
|
if (sess->sess_will.msg) |
if (sess->sess_will.msg) |
Line 101 finiSession(struct tagSession *sess)
|
Line 101 finiSession(struct tagSession *sess)
|
mqtt_srv_Fini(&sess->sess_srv); |
mqtt_srv_Fini(&sess->sess_srv); |
mqtt_msgFree(&sess->sess_buf, 42); |
mqtt_msgFree(&sess->sess_buf, 42); |
|
|
free(sess); | io_free(sess); |
} |
} |
|
|
static void * |
static void * |