[asterisk-commits] branch 1.2 r14830 - /branches/1.2/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 24 22:01:18 MST 2006


Author: tilghman
Date: Fri Mar 24 23:01:16 2006
New Revision: 14830

URL: http://svn.digium.com/view/asterisk?rev=14830&view=rev
Log:
Fix incorrect size of zeroing (left over from when maxmsg was hardcoded at 100)

Modified:
    branches/1.2/apps/app_voicemail.c

Modified: branches/1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_voicemail.c?rev=14830&r1=14829&r2=14830&view=diff
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Fri Mar 24 23:01:16 2006
@@ -3892,7 +3892,7 @@
 		return ERROR_LOCK_PATH;
 	
 	vms->curmsg = -1; 
-	for (x=0;x < vmu->maxmsg;x++) { 
+	for (x = 0; x < vmu->maxmsg; x++) { 
 		if (!vms->deleted[x] && (strcasecmp(vms->curbox, "INBOX") || !vms->heard[x])) { 
 			/* Save this message.  It's not in INBOX or hasn't been heard */ 
 			make_file(vms->fn, sizeof(vms->fn), vms->curdir, x); 
@@ -3926,9 +3926,9 @@
 
 done:
 	if (vms->deleted)
-		memset(vms->deleted, 0, sizeof(vms->deleted)); 
+		memset(vms->deleted, 0, vmu->maxmsg * sizeof(int)); 
 	if (vms->heard)
-		memset(vms->heard, 0, sizeof(vms->heard)); 
+		memset(vms->heard, 0, vmu->maxmsg * sizeof(int)); 
 
 	return 0;
 }



More information about the asterisk-commits mailing list