aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-04 17:20:56 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-04 17:20:56 +0000
commit19146c5e681867bdb472e1fe9685e1de78831050 (patch)
tree87ab51ac0aaa60cc9c998d9bc4b5ee7a1854f544
parentf3aed9e155e5c47fe431374214f1b9093eaa3b37 (diff)
Merged revisions 233100 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r233100 | russell | 2009-12-04 11:18:22 -0600 (Fri, 04 Dec 2009) | 14 lines Merged revisions 233092 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r233092 | russell | 2009-12-04 11:12:47 -0600 (Fri, 04 Dec 2009) | 7 lines Only do frame payload check for HOLD frames. This code was added for helping to debug the source of invalid HOLD frames. However, a side effect of this is that it will incorrectly report errors for frames that have an integer payload. Make the check for this block specific to the HOLD frame case. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@233112 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/channel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/channel.c b/main/channel.c
index 58eac2a85..4fd3771d5 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3018,14 +3018,14 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
ast_frame_dump(chan->name, f, "<<");
chan->fin = FRAMECOUNT_INC(chan->fin);
- if (f && f->datalen == 0 && f->data) {
+ if (f && f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HOLD && f->datalen == 0 && f->data) {
/* fix invalid pointer */
f->data = NULL;
#ifdef AST_DEVMODE
- ast_log(LOG_ERROR, "Found frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
+ ast_log(LOG_ERROR, "Found HOLD frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
ast_frame_dump(chan->name, f, "<<");
#else
- ast_debug(3, "Found frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
+ ast_debug(3, "Found HOLD frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
#endif
}