PATCH for app_hasnewvoicemail

This patch fixes the VMCOUNT() and HasNewVoicemail() functions to return the actual new message count. There was a ‘break’ after finding the first new message and the function would always return 1. I don’t know if it was supposed to be that was, but according to all the documentation, it was supposed to return the actual count, not a flag.

  • James Armstrong

? app_hasnewvoicemail.diff
Index: app_hasnewvoicemail.c

RCS file: /usr/cvsroot/asterisk/apps/app_hasnewvoicemail.c,v
retrieving revision 1.17
diff -u -r1.17 app_hasnewvoicemail.c
— app_hasnewvoicemail.c 5 Oct 2005 01:37:48 -0000 1.17
+++ app_hasnewvoicemail.c 7 Oct 2005 13:53:18 -0000
@@ -78,7 +78,6 @@
while ((vment = readdir(vmdir))) {
if (!strncmp(vment->d_name + 7, “.txt”, 4)) {
count++;

  •   		break;
      	}
      }
      closedir(vmdir);