[asterisk-commits] jpeeler: branch 1.6.1 r146876 - in /branches/1.6.1: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 6 17:04:23 CDT 2008


Author: jpeeler
Date: Mon Oct  6 17:04:23 2008
New Revision: 146876

URL: http://svn.digium.com/view/asterisk?view=rev&rev=146876
Log:
Merged revisions 146875 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r146875 | jpeeler | 2008-10-06 17:03:01 -0500 (Mon, 06 Oct 2008) | 5 lines

Explicitly set args in park_call_exec NULL so in the case of no options being passed in, there
 is no garbage attempted to be used. Also, do not set args to unknown value again if there are
 no options passed in.


........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/features.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/features.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/features.c?view=diff&rev=146876&r1=146875&r2=146876
==============================================================================
--- branches/1.6.1/main/features.c (original)
+++ branches/1.6.1/main/features.c Mon Oct  6 17:04:23 2008
@@ -2773,22 +2773,30 @@
 	if (!res) {
 		struct ast_park_call_args args = {
 			.orig_chan_name = orig_chan_name,
+			.extout = NULL,
+			.return_con = NULL,
+			.return_ext = NULL,
 		};
 		struct ast_flags flags = { 0 };
 
-		if (parse && !ast_strlen_zero(app_args.timeout)) {
-			if (sscanf(app_args.timeout, "%d", &args.timeout) != 1) {
-				ast_log(LOG_WARNING, "Invalid timeout '%s' provided\n", app_args.timeout);
-				args.timeout = 0;
+		if (parse) {
+			if (!ast_strlen_zero(app_args.timeout)) {
+				if (sscanf(app_args.timeout, "%d", &args.timeout) != 1) {
+					ast_log(LOG_WARNING, "Invalid timeout '%s' provided\n", app_args.timeout);
+					args.timeout = 0;
+				}
 			}
-		}
-
-		args.return_con = app_args.return_con;
-		args.return_ext = app_args.return_ext;
-		if (parse && !ast_strlen_zero(app_args.return_pri)) {
-			if (sscanf(app_args.return_pri, "%d", &args.return_pri) != 1) {
-				ast_log(LOG_WARNING, "Invalid priority '%s' specified\n", app_args.return_pri);
-				args.return_pri = 0;
+			if (!ast_strlen_zero(app_args.return_con)) {
+				args.return_con = app_args.return_con;
+			}
+			if (!ast_strlen_zero(app_args.return_ext)) {
+				args.return_ext = app_args.return_ext;
+			}
+			if (!ast_strlen_zero(app_args.return_pri)) {
+				if (sscanf(app_args.return_pri, "%d", &args.return_pri) != 1) {
+					ast_log(LOG_WARNING, "Invalid priority '%s' specified\n", app_args.return_pri);
+					args.return_pri = 0;
+				}
 			}
 		}
 




More information about the asterisk-commits mailing list