Skip to content

Commit

Permalink
Disconnect user if cli_regular callback does not return CLI_OK
Browse files Browse the repository at this point in the history
  • Loading branch information
dparrish committed Jun 16, 2010
1 parent ca048e6 commit fe25024
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcli/libcli.c
Expand Up @@ -1246,7 +1246,10 @@ int cli_loop(struct cli_def *cli, int sockfd)
{
/* timeout every second */
if (cli->regular_callback && cli->regular_callback(cli) != CLI_OK)
{
strncpy(cmd, "quit", 4096);
break;
}

if (cli->idle_timeout)
{
Expand Down

0 comments on commit fe25024

Please sign in to comment.