--- libaitcli/src/aitcli.c 2013/11/20 16:21:55 1.9.2.3 +++ libaitcli/src/aitcli.c 2013/11/22 14:25:37 1.11.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitcli.c,v 1.9.2.3 2013/11/20 16:21:55 misho Exp $ +* $Id: aitcli.c,v 1.11.2.1 2013/11/22 14:25:37 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -1281,7 +1281,7 @@ cliReadLine(linebuffer_t * __restrict cli_buffer, int if (!cli_buffer) { cli_SetErr(EINVAL, "Invalid input parameters ..."); return NULL; - } else + } else if (timeout > 0) timeout *= 1000; /* convert from sec to ms */ memset(&fds, 0, sizeof fds); @@ -1535,7 +1535,7 @@ cliLoop(linebuffer_t * __restrict cli_buffer, const ch cli_freeLine(cli_buffer); cli_resetHistory(cli_buffer); e_free(line); - } while (ret < 1); + } while (cli_buffer->line_kill || ret < 1); cli_saveHistory(cli_buffer, csHistFile, HISTORY_LINES); return ret;