[Asterisk-cvs] asterisk/apps app_voicemail.c,1.84,1.85

markster at lists.digium.com markster at lists.digium.com
Sat May 1 18:22:25 CDT 2004


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

Modified Files:
	app_voicemail.c 
Log Message:
Further minor fixup


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- app_voicemail.c	1 May 2004 22:11:58 -0000	1.84
+++ app_voicemail.c	1 May 2004 22:29:54 -0000	1.85
@@ -1033,8 +1033,10 @@
 	char prependfile[80];
 	
 	/* barf if no pointer passed to store duration in */
-	if (duration == NULL)
+	if (duration == NULL) {
 		ast_log(LOG_WARNING, "Error play_and_prepend called without duration pointer\n");
+		return -1;
+	}
 
 	ast_log(LOG_DEBUG,"play_and_prepend: %s, %s, '%s'\n", playfile ? playfile : "<None>", recordfile, fmt);
 	snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "<None>", recordfile, chan->name);
@@ -1252,8 +1254,10 @@
 	int rfmt=0;
 
 	/* barf if no pointer passed to store duration in */
-	if (duration == NULL)
+	if (duration == NULL) {
 		ast_log(LOG_WARNING, "Error play_and_record called without duration pointer\n");
+		return -1;
+	}
 
 	ast_log(LOG_DEBUG,"play_and_record: %s, %s, '%s'\n", playfile ? playfile : "<None>", recordfile, fmt);
 	snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "<None>", recordfile, chan->name);
@@ -2445,7 +2449,7 @@
 				snprintf(callerid, sizeof(callerid), "FWD from: %s from %s", sender->fullname, ast_variable_retrieve(mif, NULL, "callerid"));
 				s = ast_variable_retrieve(mif, NULL, "duration");
 				if (s)
-					duration = atol(s);
+					duration = atoi(s);
 				else
 					duration = 0;
 				if (strlen(vmtmp->email)) {
@@ -4130,8 +4134,10 @@
  	/* Note that urgent and private are for flagging messages as such in the future */
  
 	/* barf if no pointer passed to store duration in */
-	if (duration == NULL)
+	if (duration == NULL) {
 		ast_log(LOG_WARNING, "Error play_record_review called without duration pointer\n");
+		return -1;
+	}
 
  	cmd = '3';	 /* Want to start by recording */
  




More information about the svn-commits mailing list