summaryrefslogtreecommitdiff
path: root/channels/chan_h323.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-01-31 17:18:58 +0000
committerRussell Bryant <russell@russellbryant.com>2006-01-31 17:18:58 +0000
commite01861fafd6f74f65f2cb4ac90b811a9bb0a52c7 (patch)
tree5d573d837383e784c67dabc01fcfad5e8aec9801 /channels/chan_h323.c
parent18eac350afb23f696f4c56233b6a18094b201041 (diff)
define a global null_frame object so when queueing a null frame, you don't
have to allocate one on the stack git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_h323.c')
-rw-r--r--channels/chan_h323.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index 43d7a2414..a4a9459b1 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -543,7 +543,6 @@ static struct ast_frame *oh323_rtp_read(struct oh323_pvt *pvt)
{
/* Retrieve audio/etc from channel. Assumes pvt->lock is already held. */
struct ast_frame *f;
- static struct ast_frame null_frame = { AST_FRAME_NULL, };
/* Only apply it for the first packet, we just need the correct ip/port */
if (pvt->options.nat) {
@@ -554,7 +553,7 @@ static struct ast_frame *oh323_rtp_read(struct oh323_pvt *pvt)
f = ast_rtp_read(pvt->rtp);
/* Don't send RFC2833 if we're not supposed to */
if (f && (f->frametype == AST_FRAME_DTMF) && !(pvt->options.dtmfmode & H323_DTMF_RFC2833)) {
- return &null_frame;
+ return &ast_null_frame;
}
if (pvt->owner) {
/* We already hold the channel lock */
@@ -563,7 +562,7 @@ static struct ast_frame *oh323_rtp_read(struct oh323_pvt *pvt)
/* Try to avoid deadlock */
if (ast_mutex_trylock(&pvt->owner->lock)) {
ast_log(LOG_NOTICE, "Format changed but channel is locked. Ignoring frame...\n");
- return &null_frame;
+ return &ast_null_frame;
}
ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
pvt->owner->nativeformats = f->subclass;