Ignore voice frames for CAPI without data silently.

This commit is contained in:
MelwareDE 2010-02-13 21:23:59 +00:00
parent b42ada0ec9
commit 85926f056a
2 changed files with 5 additions and 4 deletions

View File

@ -5,6 +5,7 @@ HEAD
------------------
- corrected check for Info value on CONNECT_B3_CONF
- fixed NULL-pointer in cid_name (asterisk 1.6 pickup revealed this)
- changed action on prodding in .write function to ignore it
chan_capi-1.1.4
------------------

View File

@ -1367,6 +1367,10 @@ int capi_write_frame(struct capi_pvt *i, struct ast_frame *f)
if (unlikely(f->frametype == AST_FRAME_NULL)) {
return 0;
}
if (unlikely((!f->FRAME_DATA_PTR) || (!f->datalen))) {
/* prodding from Asterisk, just returning */
return 0;
}
if (unlikely(f->frametype == AST_FRAME_DTMF)) {
cc_log(LOG_ERROR, "dtmf frame should be written\n");
return 0;
@ -1380,10 +1384,6 @@ int capi_write_frame(struct capi_pvt *i, struct ast_frame *f)
i->vname);
return 0;
}
if (unlikely((!f->FRAME_DATA_PTR) || (!f->datalen))) {
cc_log(LOG_DEBUG, "No data for FRAME_VOICE %s\n", i->vname);
return 0;
}
if (i->isdnstate & CAPI_ISDN_STATE_RTP) {
if (unlikely((!(f->subclass & i->codec)) &&
(f->subclass != capi_capability))) {