[asterisk-commits] jrose: branch 11 r384326 - in /branches/11: ./ apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 29 11:31:48 CDT 2013


Author: jrose
Date: Fri Mar 29 11:31:45 2013
New Revision: 384326

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384326
Log:
app_voicemail: Add blank argument to externnotify if no context argument

At least one call to run_externnotify provides a NULL context parameter and
because the snprintf statement doesn't account for a NULL context parameter,
it simply writes '(null)' to the arguments string instead. This patch makes
it write two quotes back to back for that argument instead in the event of
a NULL context.

(closes issue ASTERISK-18207)
Reported by: Barry L. Kline
Patches:
	modified from patch-20130306 uploaded by Karsten Wemheuer (License 5930)
........

Merged revisions 384325 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/apps/app_voicemail.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_voicemail.c?view=diff&rev=384326&r1=384325&r2=384326
==============================================================================
--- branches/11/apps/app_voicemail.c (original)
+++ branches/11/apps/app_voicemail.c Fri Mar 29 11:31:45 2013
@@ -5902,7 +5902,10 @@
 		if (inboxcount2(ext_context, &urgentvoicemails, &newvoicemails, &oldvoicemails)) {
 			ast_log(AST_LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", extension);
 		} else {
-			snprintf(arguments, sizeof(arguments), "%s %s %s %d %d %d &", externnotify, context, extension, newvoicemails, oldvoicemails, urgentvoicemails);
+			snprintf(arguments, sizeof(arguments), "%s %s %s %d %d %d &",
+				externnotify, S_OR(context, "\"\""),
+				extension, newvoicemails,
+				oldvoicemails, urgentvoicemails);
 			ast_debug(1, "Executing %s\n", arguments);
 			ast_safe_system(arguments);
 		}




More information about the asterisk-commits mailing list