diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-06 20:52:04 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-06 20:52:04 +0000 |
commit | 3b1bf702011c08401b97cee1017895dfcc7ee264 (patch) | |
tree | ce7af6e2837fc62eebc72d3fa67614f23e1579cf /channels/chan_sip.c | |
parent | a4c4257ac1ae5b983a65863f0c610822ee0623f3 (diff) |
Dialplan functions should not actually return 0, unless they have modified the
workspace. To signal an error (and no change to the workspace), -1 should be
returned instead.
(closes issue #13340)
Reported by: kryptolus
Patches:
20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@146799 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9d9f9cb7d..07b923629 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12001,7 +12001,11 @@ static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, cha index = atoi(codecnum); if((codec = ast_codec_pref_index(&peer->prefs, index))) { ast_copy_string(buf, ast_getformatname(codec), len); + } else { + buf[0] = '\0'; } + } else { + buf[0] = '\0'; } ASTOBJ_UNREF(peer, sip_destroy_peer); |