version 1.2.2.46, 2012/07/03 07:57:16
|
version 1.2.2.47, 2012/07/03 08:39:39
|
Line 222 startSession(sched_task_t *task)
|
Line 222 startSession(sched_task_t *task)
|
int ret, wlen; |
int ret, wlen; |
mqtt_subscr_t *subs; |
mqtt_subscr_t *subs; |
struct timespec ts = { RETAIN_TIMEOUT, 0 }; |
struct timespec ts = { RETAIN_TIMEOUT, 0 }; |
|
intptr_t sock; |
|
|
ioTRACE(4); |
ioTRACE(4); |
|
|
Line 285 startSession(sched_task_t *task)
|
Line 286 startSession(sched_task_t *task)
|
TAILQ_FOREACH(s, &Sessions, sess_node) |
TAILQ_FOREACH(s, &Sessions, sess_node) |
if (!strcmp(s->sess_cid, sess->sess_cid)) { |
if (!strcmp(s->sess_cid, sess->sess_cid)) { |
/* found stale session & disconnect it! */ |
/* found stale session & disconnect it! */ |
schedCancelby(root, taskMAX, CRITERIA_FD, (void*) s->sess_sock, NULL); | sock = s->sess_sock; |
| schedCancelby(root, taskMAX, CRITERIA_FD, (void*) sock, NULL); |
schedWrite(root, leaveClient, s, s->sess_sock, NULL, 0); |
schedWrite(root, leaveClient, s, s->sess_sock, NULL, 0); |
break; |
break; |
} |
} |