Change api for pbx_builtin_setvar to actually return error code if a function can't be written to.

This patch removes code that was duplicated from pbx.c to manager.c
in order to prevent API change in released versions of Asterisk.

There are propably also other places that would benefit from reading the
return code and react if a function returns error codes on writing a value into it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Olle Johansson
2010-01-25 21:13:20 +00:00
parent 52b0cb912b
commit 7c61a7105f
3 changed files with 8 additions and 10 deletions

View File

@@ -990,8 +990,10 @@ void pbx_builtin_pushvar_helper(struct ast_channel *chan, const char *name, cons
* \brief Add a variable to the channel variable stack, removing the most recently set value for the same name.
* \note Will lock the channel. May also be used to set a channel dialplan function to a particular value.
* \see ast_func_write
* \return -1 if the dialplan function fails to be set
* \version 1.8 changed the function to return an error code
*/
void pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value);
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value);
/*!
* \brief Retrieve the value of a builtin variable or variable from the channel variable stack.