diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-18 19:52:56 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-18 19:52:56 +0000 |
commit | d2d661efcc3a9d7cb5511af98d1138e714088fbc (patch) | |
tree | 60d09b045f5e6c29991e2584eab29d7bb7f812e5 /channels | |
parent | d5fdb33f2676e8615849769e64d043f9d39a7e87 (diff) |
Merged revisions 69796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r69796 | tilghman | 2007-06-18 14:48:17 -0500 (Mon, 18 Jun 2007) | 2 lines
Issue 10005 - Segfault with missing arguments, plus fix a missing define for SIP INFO channels
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69797 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6b4834d90..991695d30 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1646,6 +1646,7 @@ static const struct ast_channel_tech sip_tech_info = { .send_digit_end = sip_senddigit_end, .bridge = ast_rtp_bridge, .send_text = sip_sendtext, + .func_channel_read = acf_channel_read, }; /**--- some list management macros. **/ @@ -14992,12 +14993,15 @@ static int acf_channel_read(struct ast_channel *chan, const char *funcname, char if (ast_strlen_zero(args.param) || strcasecmp(args.param, "rtpqos")) return -1; + /* Default arguments of audio,all */ + if (ast_strlen_zero(args.type)) + args.type = "audio"; + if (ast_strlen_zero(args.field)) + args.field = "all"; + memset(buf, 0, buflen); memset(&qos, 0, sizeof(qos)); - if (ast_strlen_zero(args.type)) - return -1; - if (strcasecmp(args.type, "AUDIO") == 0) { all = ast_rtp_get_quality(p->rtp, &qos); } else if (strcasecmp(args.type, "VIDEO") == 0) { @@ -15006,9 +15010,6 @@ static int acf_channel_read(struct ast_channel *chan, const char *funcname, char all = ast_rtp_get_quality(p->trtp, &qos); } - if (ast_strlen_zero(args.field)) - return -1; - if (strcasecmp(args.field, "local_ssrc") == 0) snprintf(buf, buflen, "%u", qos.local_ssrc); else if (strcasecmp(args.field, "local_lostpackets") == 0) |