static void tims_handle_input(void *arg) { int l = 0; char buffer[MAX_LINESIZE]; /* connection buffer */ ClientSession_t *session = (ClientSession_t *)arg; ci_cork(session->ci); while (TRUE) { memset(buffer, 0, sizeof(buffer)); l = ci_readln(session->ci, buffer); if (l == 0) break; if ((l = tims_tokenizer(session, buffer))) { if (l == -3) { client_session_bailout(&session); return; } if (tims(session) == -3) { client_session_bailout(&session); return; } client_session_reset_parser(session); } } if (session->state < QUIT) ci_uncork(session->ci); }
static void tims_handle_input(void *arg) { int l = 0; char buffer[MAX_LINESIZE]; /* connection buffer */ ClientSession_T *session = (ClientSession_T *)arg; while (TRUE) { memset(buffer, 0, sizeof(buffer)); l = ci_readln(session->ci, buffer); if (l == 0) break; if ((l = tims_tokenizer(session, buffer))) { if (l == -3) { client_session_bailout(&session); return; } if (tims(session) == -3) { client_session_bailout(&session); return; } client_session_reset_parser(session); } } TRACE(TRACE_DEBUG,"[%p] done", session); }