version 1.2.2.1, 2012/01/27 15:18:12
|
version 1.2.2.2, 2012/01/27 16:19:04
|
Line 43 initSession(int sock, ait_val_t * __restrict v)
|
Line 43 initSession(int sock, ait_val_t * __restrict v)
|
return NULL; |
return NULL; |
} |
} |
|
|
|
sess->sess_srv = mqtt_srv_Init(sock, sess->sess_buf); |
|
if (!sess->sess_srv) { |
|
ioDEBUG(3, "Error:: in srv_Init #%d - %s", mqtt_GetErrno(), mqtt_GetError()); |
|
mqtt_msgFree(&sess->sess_buf, 42); |
|
free(sess); |
|
io_freeVar(v); |
|
return NULL; |
|
} |
|
|
sess->sess_sock = sock; |
sess->sess_sock = sock; |
strlcpy(sess->sess_addr, (char*) AIT_GET_STR(v), sizeof sess->sess_addr); |
strlcpy(sess->sess_addr, (char*) AIT_GET_STR(v), sizeof sess->sess_addr); |
io_freeVar(v); |
io_freeVar(v); |
Line 81 finiSession(struct tagSession *sess, int preservSock)
|
Line 90 finiSession(struct tagSession *sess, int preservSock)
|
if (sess->sess_sock > STDERR_FILENO && !preservSock) |
if (sess->sess_sock > STDERR_FILENO && !preservSock) |
srv_Close(sess->sess_sock); |
srv_Close(sess->sess_sock); |
|
|
|
mqtt_srv_Fini(&sess->sess_srv); |
mqtt_msgFree(&sess->sess_buf, 42); |
mqtt_msgFree(&sess->sess_buf, 42); |
|
|
free(sess); |
free(sess); |
Line 165 KASession(struct tagSession *sess)
|
Line 175 KASession(struct tagSession *sess)
|
static void * |
static void * |
thrSession(struct tagSession *sess) |
thrSession(struct tagSession *sess) |
{ |
{ |
mqtt_msg_t msg = { NULL, 0 }; |
|
int ret, locKill = 42; |
int ret, locKill = 42; |
struct pollfd pfd; |
struct pollfd pfd; |
struct mqtthdr *hdr; |
struct mqtthdr *hdr; |