[asterisk-commits] jrose: branch 1.8-digiumphones r358725 - /branches/1.8-digiumphones/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 8 12:40:15 CST 2012


Author: jrose
Date: Thu Mar  8 12:40:13 2012
New Revision: 358725

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358725
Log:
Fixes unitialized variable use warning introduced by addition of mixmonitor forward to vm

Modified:
    branches/1.8-digiumphones/apps/app_mixmonitor.c

Modified: branches/1.8-digiumphones/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8-digiumphones/apps/app_mixmonitor.c?view=diff&rev=358725&r1=358724&r2=358725
==============================================================================
--- branches/1.8-digiumphones/apps/app_mixmonitor.c (original)
+++ branches/1.8-digiumphones/apps/app_mixmonitor.c Thu Mar  8 12:40:13 2012
@@ -424,7 +424,7 @@
 	struct mixmonitor *mixmonitor = obj;
 	struct ast_filestream **fs = NULL;
 	unsigned int oflags;
-	char *ext;
+	char *ext = "";
 	char *last_slash;
 	int errflag = 0;
 
@@ -507,8 +507,13 @@
 	ast_verb(2, "End MixMonitor Recording %s\n", mixmonitor->name);
 
 	if (!AST_LIST_EMPTY(&mixmonitor->recipient_list)) {
-		ast_verb(3, "Copying recordings for Mixmonitor %s to voicemail recipients\n", mixmonitor->name);
-		copy_to_voicemail(mixmonitor, ext);
+		if (ast_strlen_zero(ext)) {
+			ast_log(LOG_ERROR, "No file extension set for Mixmonitor %s. Skipping copy to voicemail.\n",
+				mixmonitor -> name);
+		} else {
+			ast_verb(3, "Copying recordings for Mixmonitor %s to voicemail recipients\n", mixmonitor->name);
+			copy_to_voicemail(mixmonitor, ext);
+		}
 	} else {
 		ast_debug(3, "No recipients to forward monitor to, moving on.\n");
 	}




More information about the asterisk-commits mailing list