--- libaitcli/inc/aitcli.h 2013/11/20 16:04:42 1.8.2.1 +++ libaitcli/inc/aitcli.h 2013/11/20 16:18:33 1.8.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitcli.h,v 1.8.2.1 2013/11/20 16:04:42 misho Exp $ +* $Id: aitcli.h,v 1.8.2.2 2013/11/20 16:18:33 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -534,9 +534,10 @@ int cliInitLine(linebuffer_t * __restrict cli_buffer); * * @cli_buffer = CLI buffer * @timeout = Session timeout (-1 infinit) + * @cmd_name = If timeout reached, we should call with this cmd_name (default name is "exit") * return: NULL if error or !=NULL readed line, must be e_free after use! */ -char *cliReadLine(linebuffer_t * __restrict cli_buffer, int timeout); +char *cliReadLine(linebuffer_t * __restrict cli_buffer, int timeout, const char *cmd_name); /* * cliLoop() - CLI main loop @@ -544,9 +545,11 @@ char *cliReadLine(linebuffer_t * __restrict cli_buffer * @cli_buffer = CLI buffer * @csHistFile = History file name * @timeout = Session timeout (-1 infinit) + * @cmd_name = If timeout reached, we should call with this cmd_name (default name is "exit") * return: RETCODE_ERR error, RETCODE_OK ok */ -int cliLoop(linebuffer_t * __restrict cli_buffer, const char *csHistFile, int timeout); +int cliLoop(linebuffer_t * __restrict cli_buffer, const char *csHistFile, + int timeout, const char *cmd_name); /* * cliNetLoop() - CLI network main loop binded to socket * @@ -554,10 +557,11 @@ int cliLoop(linebuffer_t * __restrict cli_buffer, cons * @csHistFile = History file name * @sock = client socket * @timeout = Session timeout (-1 infinit) + * @cmd_name = If timeout reached, we should call with this cmd_name (default name is "exit") * return: RETCODE_ERR error, RETCODE_OK ok */ int cliNetLoop(linebuffer_t * __restrict cli_buffer, const char *csHistFile, - int sock, int timeout); + int sock, int timeout, const char *cmd_name); #endif