else
fputs(s + pos,stdout);
fflush(stdout);
- if (complete)
- /* Wake up a poll()ing console */
+ if (complete) {
+ /* Wake up a poll()ing console */
if (option_console && consolethread != AST_PTHREADT_NULL)
pthread_kill(consolethread, SIGURG);
+ }
}
static int ast_all_zeros(char *s)
continue;
}
- numoutput++; numoutputline++;
+ numoutput++;
+ numoutputline++;
fprintf(stdout, "%-*s ", max, matches[idx]);
free(matches[idx]);
matches[idx] = NULL;
matches = (char **) NULL;
- } else {
+ } else {
nummatches = ast_cli_generatornummatches((char *)lf->buffer,ptr);
matches = ast_cli_completion_matches((char *)lf->buffer,ptr);
}
v = ast_variable_browse(cfg, "options");
while(v) {
- if(!strcasecmp(v->name, "verbose")) {
+ if (!strcasecmp(v->name, "verbose")) {
option_verbose= atoi(v->value);
} else if (!strcasecmp(v->name, "debug")) {
option_debug= ast_true(v->value);
_argv[x] = NULL;
/* if the progname is rasterisk consider it a remote console */
- if ( argv[0] && (strstr(argv[0], "rasterisk")) != NULL) {
+ if (argv[0] && (strstr(argv[0], "rasterisk")) != NULL) {
option_remote++;
option_nofork++;
}
set_icon("Asterisk");
snprintf(title, sizeof(title), "Asterisk Console on '%s' (pid %d)", hostname, ast_mainpid);
set_title(title);
- ast_cli_register(&quit);
- ast_cli_register(&astexit);
+ ast_cli_register(&quit);
+ ast_cli_register(&astexit);
for (;;) {
buf = (char *)el_gets(el, &num);