Skip to content
Snippets Groups Projects
Commit fa969196 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "main/cli: Use proper string methods to check existence of context/exten/app" into 13

parents 6dd8b672 af288b2d
No related branches found
No related tags found
No related merge requests found
......@@ -1076,10 +1076,12 @@ static char *handle_chanlist(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
char locbuf[40] = "(None)";
char appdata[40] = "(None)";
if (!cs->context && !cs->exten)
if (!ast_strlen_zero(cs->context) && !ast_strlen_zero(cs->exten)) {
snprintf(locbuf, sizeof(locbuf), "%s@%s:%d", cs->exten, cs->context, cs->priority);
if (cs->appl)
}
if (!ast_strlen_zero(cs->appl)) {
snprintf(appdata, sizeof(appdata), "%s(%s)", cs->appl, S_OR(cs->data, ""));
}
ast_cli(a->fd, FORMAT_STRING, cs->name, locbuf, ast_state2str(cs->state), appdata);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment