|Summary:||ASTERISK-06390: [patch] Add existence / permission check before running a script|
|Reporter:||Edwin Groothuis (mavetju)||Labels:|
|Date Opened:||2006-02-21 21:52:24.000-0600||Date Closed:||2006-02-22 10:48:13.000-0600|
|Environment:||Attachments:||( 0) patch-res::res_agi.c|
|Description:||If asterisk is started in the background (i.e. without console), and a AGI command is called but the script doesn't exist, or permissions on the file don't allow it to be executed, the error message is lost (line 325 of res/res_agi.c)|
Some help could be to check the existence of the file (stat(2)) and the permissions (access(2)) and throwing warnings if they don't pass the test.
|Comments:||By: Edwin Groothuis (mavetju) 2006-02-21 22:09:11.000-0600|
patch is 1.2 compatible,
By: Tilghman Lesher (tilghman) 2006-02-22 10:48:13.000-0600
This was already fixed in a much better way, by using the pipe established for AGI communication, to send a verbose message detailing why the exec failed.