|
|
| version 1.1.2.20, 2011/12/14 15:09:31 | version 1.1.2.21, 2011/12/15 12:57:40 |
|---|---|
| Line 139 startSession(sched_task_t *task) | Line 139 startSession(sched_task_t *task) |
| if (call.LoginACC(&cfg, acc, sess->sess_user, sess->sess_pass) < 1) { | if (call.LoginACC(&cfg, acc, sess->sess_user, sess->sess_pass) < 1) { |
| ioDEBUG(0, "Login:: DENIED for username %s and password %s", | ioDEBUG(0, "Login:: DENIED for username %s and password %s", |
| sess->sess_user, sess->sess_pass); | sess->sess_user, sess->sess_pass); |
| ret = MQTT_RETCODE_DENIED; | |
| goto end; | goto end; |
| } else | } else { |
| ioDEBUG(0, "Login:: ALLOWED for username %s ...", sess->sess_user); | ioDEBUG(0, "Login:: ALLOWED for username %s ...", sess->sess_user); |
| ret = MQTT_RETCODE_ACCEPTED; | |
| } | |
| ret = mqtt_msgCONNACK(&msg, ret); | ret = mqtt_msgCONNACK(&msg, ret); |
| if ((ret = send(sess->sess_sock, msg.msg_base, ret, 0)) == -1) { | if ((ret = send(sess->sess_sock, msg.msg_base, ret, 0)) == -1) { |
| Line 192 thrSched(void *arg __unused) | Line 195 thrSched(void *arg __unused) |
| ioTRACE(1); | ioTRACE(1); |
| schedRun(root, &Kill); | schedRun(root, &Kill); |
| printf("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"); | |
| TAILQ_FOREACH(sess, &Sessions, sess_node) | TAILQ_FOREACH(sess, &Sessions, sess_node) |
| if (sess->sess_tid) | if (sess->sess_tid) |
| Line 241 Run(int sock) | Line 243 Run(int sock) |
| ioDEBUG(1, "Connected client with socket=%d from %s:%d", cli, | ioDEBUG(1, "Connected client with socket=%d from %s:%d", cli, |
| AIT_GET_STR(v), io_n2port(&sa)); | AIT_GET_STR(v), io_n2port(&sa)); |
| /* | |
| if (!schedRead(root, startSession, v, cli)) { | if (!schedRead(root, startSession, v, cli)) { |
| io_freeVar(v); | io_freeVar(v); |
| close(cli); | close(cli); |
| ioDEBUG(1, "Terminated client with socket=%d", cli); | ioDEBUG(1, "Terminated client with socket=%d", cli); |
| } | } |
| */ | |
| } | } |
| printf("rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\n"); | |
| return 0; | return 0; |
| } | } |