version 1.2.2.7, 2012/04/15 22:06:10
|
version 1.2.2.8, 2012/04/15 23:45:34
|
Line 47 initSession(int sock, ait_val_t * __restrict v)
|
Line 47 initSession(int sock, ait_val_t * __restrict v)
|
return NULL; |
return NULL; |
} |
} |
|
|
|
/* init server actor */ |
sess->sess_srv = mqtt_srv_Init(sock, sess->sess_buf); |
sess->sess_srv = mqtt_srv_Init(sock, sess->sess_buf); |
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()); |
Line 284 startSession(sched_task_t *task)
|
Line 285 startSession(sched_task_t *task)
|
assert(task); |
assert(task); |
|
|
if (!TASK_DATA(task)) { |
if (!TASK_DATA(task)) { |
|
/* flow from accept new clients */ |
sess = initSession(TASK_FD(task), TASK_ARG(task)); |
sess = initSession(TASK_FD(task), TASK_ARG(task)); |
if (!sess) { |
if (!sess) { |
io_freeVar(TASK_ARG(task)); |
io_freeVar(TASK_ARG(task)); |
Line 395 static void *
|
Line 397 static void *
|
thrSched(void *arg __unused) |
thrSched(void *arg __unused) |
{ |
{ |
struct tagSession *sess; |
struct tagSession *sess; |
struct timespec pl = { 0, 10000000 }; | struct timespec pl = { 0, 100000000 }; |
|
|
ioTRACE(1); |
ioTRACE(1); |
|
|
|
/* start scheduler loop */ |
schedPolling(root, &pl, NULL); |
schedPolling(root, &pl, NULL); |
schedRun(root, &Kill); |
schedRun(root, &Kill); |
|
|
Line 434 Run(int sock)
|
Line 437 Run(int sock)
|
return -1; |
return -1; |
} |
} |
|
|
|
/* state machine - accept new connections */ |
while (!Kill) { |
while (!Kill) { |
if ((cli = accept(sock, &sa.sa, &sslen)) == -1) { |
if ((cli = accept(sock, &sa.sa, &sslen)) == -1) { |
if (!Kill) |
if (!Kill) |