Newer
Older
ast_mutex_lock(&clilock);
ast_mutex_unlock(&clilock);
if (e) {
switch(e->handler(fd, x, argv)) {
case RESULT_SHOWUSAGE:
ast_cli(fd, e->usage);
break;
}
} else
ast_cli(fd, "No such command '%s' (type 'help' for help)\n", find_best(argv));
ast_mutex_lock(&clilock);
ast_mutex_unlock(&clilock);
}
free(dup);
} else {
ast_log(LOG_WARNING, "Out of memory\n");
return -1;
}
return 0;
}