[Asterisk-cvs] asterisk/apps app_voicemail.c,1.269,1.270

kpfleming kpfleming
Fri Nov 11 21:43:23 CST 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv19780/apps

Modified Files:
	app_voicemail.c 
Log Message:
issue #5718


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -d -r1.269 -r1.270
--- app_voicemail.c	12 Nov 2005 00:52:08 -0000	1.269
+++ app_voicemail.c	12 Nov 2005 02:34:01 -0000	1.270
@@ -3479,10 +3479,16 @@
 				ast_log(LOG_DEBUG, "%s", sys);
 				ast_safe_system(sys);
 		
-				if ( (res = count_messages(receiver, todir)) )
+				res = count_messages(receiver, todir);
+
+				if ( (res == ERROR_LOCK_PATH) || (res < 0) ) {
+					if (res == ERROR_LOCK_PATH)
+						ast_log(LOG_WARNING, "Unable to lock the directory %s to forward the requested vmail msg!\n", todir);
+					else
+						ast_log(LOG_WARNING, "Unable to determine how many msgs are in the destination folder!\n");
 					break;
-				else
-					todircount = res;
+				}
+				todircount = res;
 				ast_copy_string(tmp, fmt, sizeof(tmp));
 				stringp = tmp;
 				while ((s = strsep(&stringp, "|"))) {
@@ -3547,8 +3553,7 @@
 					res = ast_play_and_wait(chan, "vm-messages");
 				if (!res)
 					res = ast_play_and_wait(chan, "vm-saved"); */
-				if (!res)
-					res = ast_play_and_wait(chan, "vm-msgsaved");
+				res = ast_play_and_wait(chan, "vm-msgsaved");
 			}	
 		}
 	}




More information about the svn-commits mailing list