ensure that 'zap show status' always generates output, even when there are no interfa...
authorKevin P. Fleming <kpfleming@digium.com>
Fri, 24 Jun 2005 02:37:32 +0000 (02:37 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Fri, 24 Jun 2005 02:37:32 +0000 (02:37 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5996 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 6ad37d2..9f41270 100755 (executable)
@@ -9373,6 +9373,7 @@ static int zap_show_status(int fd, int argc, char *argv[]) {
        ctl = open("/dev/zap/ctl", O_RDWR);
        if (ctl < 0) {
                fprintf(stderr, "Unable to open /dev/zap/ctl: %s\n", strerror(errno));
+               ast_cli(fd, "No Zaptel interface found.\n");
                return RESULT_FAILURE;
        }
        ast_cli(fd,FORMAT2, "Description", "Alarms","IRQ","bpviol","CRC4");