Summary:ASTERISK-06400: [patch] Add timeout option and return result in separate variable in CURL app/func
Reporter:mman (mman)Labels:
Date Opened:2006-02-23 04:33:24.000-0600Date Closed:2011-06-07 14:03:25
Versions:Frequency of
Environment:Attachments:( 0) app_curl.patch
Description:This patch adds a timeout option to CURL application and function and returns the result of the URL hit in a separate variable (CURLRES).
Comments:By: Tilghman Lesher (tilghman) 2006-02-23 07:50:02.000-0600

app_curl is deprecated and will not appear in future releases.  I suggest that you make your changes to the dialplan function CURL() instead.

By: mman (mman) 2006-02-23 08:34:42.000-0600

The patch includes changes for the dialplan function as well. My fault that I submitted the patch at the 'Applications' category. Should I resubmit it there or you can move it there?

By: Tilghman Lesher (tilghman) 2006-02-23 15:25:29.000-0600

Couple of changes:

1.  Your patch must be against trunk, not 1.2.  This is a new feature, which is constrained to go only into trunk.

2.  You're specifying "tm" as the timeout, which is bad because "tm" has a different meaning in C (namely, struct tm).  Use the word "timeout" instead.

3.  You will have to remove all sections of your patch relating to the application.

4.  The argument parsing has now been standardized.  See the trunk code.

5.  There is no need to memset, if you're going to immediately snprintf.  snprintf is always guaranteed to be null-terminated.

6.  Instead of checking arguments for not-NULL, you should instead check for !ast_strlen_zero()

By: Tilghman Lesher (tilghman) 2006-02-27 14:06:37.000-0600

Reopen when you have a new patch to post.