Fix memory leak in error paths for action_originate().

* Fix memory leak of vars in error paths for action_originate().

* Moved struct fast_originate_helper tech and data members to stringfields.

* Simplified ActionID header handling for fast_originate().

* Added doxygen note to ast_request() and ast_call() and the associated
channel callbacks that the data/addr parameters should be treated as const
char *.

Review: https://reviewboard.asterisk.org/r/1690/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@353454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2012-01-31 16:51:06 +00:00
parent d699845a55
commit c7c7d4dab4
2 changed files with 49 additions and 26 deletions

View File

@@ -512,7 +512,10 @@ struct ast_channel_tech {
int properties; /*!< Technology Properties */
/*! \brief Requester - to set up call data structures (pvt's) */
/*!
* \brief Requester - to set up call data structures (pvt's)
* \note data should be treated as const char *.
*/
struct ast_channel *(* const requester)(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause);
int (* const devicestate)(void *data); /*!< Devicestate call back */
@@ -531,8 +534,11 @@ struct ast_channel_tech {
*/
int (* const send_digit_end)(struct ast_channel *chan, char digit, unsigned int duration);
/*! \brief Call a given phone number (address, etc), but don't
* take longer than timeout seconds to do so. */
/*!
* \brief Call a given phone number (address, etc), but don't
* take longer than timeout seconds to do so.
* \note addr should be treated as const char *.
*/
int (* const call)(struct ast_channel *chan, char *addr, int timeout);
/*! \brief Hangup (and possibly destroy) the channel */
@@ -1292,7 +1298,7 @@ struct ast_channel *ast_channel_release(struct ast_channel *chan);
* \param type type of channel to request
* \param format requested channel format (codec)
* \param requestor channel asking for data
* \param data data to pass to the channel requester
* \param data data to pass to the channel requester (Should be treated as const char *)
* \param status status
*
* \details
@@ -1613,7 +1619,7 @@ int __ast_answer(struct ast_channel *chan, unsigned int delay, int cdr_answer);
* \brief Make a call
* \note Absolutely _NO_ channel locks should be held before calling this function.
* \param chan which channel to make the call on
* \param addr destination of the call
* \param addr destination of the call (Should be treated as const char *)
* \param timeout time to wait on for connect
* \details
* Place a call, take no longer than timeout ms.