mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
ensure that 'zap show status' always generates output, even when there are no interfaces present (bug #3585)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -9373,6 +9373,7 @@ static int zap_show_status(int fd, int argc, char *argv[]) {
|
|||||||
ctl = open("/dev/zap/ctl", O_RDWR);
|
ctl = open("/dev/zap/ctl", O_RDWR);
|
||||||
if (ctl < 0) {
|
if (ctl < 0) {
|
||||||
fprintf(stderr, "Unable to open /dev/zap/ctl: %s\n", strerror(errno));
|
fprintf(stderr, "Unable to open /dev/zap/ctl: %s\n", strerror(errno));
|
||||||
|
ast_cli(fd, "No Zaptel interface found.\n");
|
||||||
return RESULT_FAILURE;
|
return RESULT_FAILURE;
|
||||||
}
|
}
|
||||||
ast_cli(fd,FORMAT2, "Description", "Alarms","IRQ","bpviol","CRC4");
|
ast_cli(fd,FORMAT2, "Description", "Alarms","IRQ","bpviol","CRC4");
|
||||||
|
|||||||
Reference in New Issue
Block a user