[Asterisk-Dev] Re: asterisk/res res_agi.c,1.11,1.12

Tony Mountifield tony at softins.clara.co.uk
Thu Oct 14 01:16:24 MST 2004


In article <20041013234717.28E1A2FCEEB at lists.digium.com>,
 <citats at lists.digium.com> wrote:
> Update of /usr/cvsroot/asterisk/res
> In directory mongoose.digium.com:/home/citats/cvs/asterisk/res
> 
> Modified Files:
> 	res_agi.c 
> Log Message:
> Fix pbx_builtin_setlanguage to not seg when data is a NULL ptr.  Also fix AGI so we dont run
> into this with other specific problems as well. (bug 2641)
> 
> Index: res_agi.c
> ===================================================================
> RCS file: /usr/cvsroot/asterisk/res/res_agi.c,v
> retrieving revision 1.11
> retrieving revision 1.12
> diff -u -d -r1.11 -r1.12
> --- res_agi.c	2 Oct 2004 00:58:31 -0000	1.11
> +++ res_agi.c	13 Oct 2004 22:47:42 -0000	1.12
> @@ -827,7 +827,7 @@
>  	app = pbx_findapp(argv[1]);
>  
>  	if (app) {
> -		res = pbx_exec(chan, app, argv[2], 1);
> +		res = pbx_exec(chan, app, argv[2] ? argv[2] : NULL, 1);
>  	} else {
>  		ast_log(LOG_WARNING, "Could not find application (%s)\n", argv[1]);
>  		res = -2;
> 

Isn't this change completely redundant? If argv[2] is non-null then pass argv[2],
otherwise (i.e. argv[2] is null) pass an explicit NULL (the same as in argv[2]).

-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list