[svn-commits] trunk r9004 - in /trunk/channels: chan_iax2.c
chan_local.c chan_sip.c chan_zap.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Tue Jan 31 10:57:14 MST 2006
Author: russell
Date: Tue Jan 31 11:57:12 2006
New Revision: 9004
URL: http://svn.digium.com/view/asterisk?rev=9004&view=rev
Log:
remove some more local declarations of null frames
Modified:
trunk/channels/chan_iax2.c
trunk/channels/chan_local.c
trunk/channels/chan_sip.c
trunk/channels/chan_zap.c
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?rev=9004&r1=9003&r2=9004&view=diff
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Tue Jan 31 11:57:12 2006
@@ -3103,9 +3103,8 @@
static struct ast_frame *iax2_read(struct ast_channel *c)
{
- static struct ast_frame f = { AST_FRAME_NULL, };
ast_log(LOG_NOTICE, "I should never be called!\n");
- return &f;
+ return &ast_null_frame;
}
static int iax2_start_transfer(unsigned short callno0, unsigned short callno1)
Modified: trunk/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_local.c?rev=9004&r1=9003&r2=9004&view=diff
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Tue Jan 31 11:57:12 2006
@@ -224,9 +224,7 @@
static struct ast_frame *local_read(struct ast_channel *ast)
{
- static struct ast_frame null = { AST_FRAME_NULL, };
-
- return &null;
+ return &ast_null_frame;
}
static int local_write(struct ast_channel *ast, struct ast_frame *f)
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=9004&r1=9003&r2=9004&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jan 31 11:57:12 2006
@@ -3758,12 +3758,11 @@
if ((bridgepeer=ast_bridged_channel(p->owner))) {
/* We have a bridge */
/* Turn on/off music on hold if we are holding/unholding */
- struct ast_frame af = { AST_FRAME_NULL, };
if (sin.sin_addr.s_addr && !sendonly) {
ast_moh_stop(bridgepeer);
/* Activate a re-invite */
- ast_queue_frame(p->owner, &af);
+ ast_queue_frame(p->owner, &ast_null_frame);
} else {
/* No address for RTP, we're on hold */
@@ -3771,7 +3770,7 @@
if (sendonly)
ast_rtp_stop(p->rtp);
/* Activate a re-invite */
- ast_queue_frame(p->owner, &af);
+ ast_queue_frame(p->owner, &ast_null_frame);
}
}
@@ -9618,8 +9617,7 @@
#endif
ast_queue_control(p->owner, AST_CONTROL_ANSWER);
} else { /* RE-invite */
- struct ast_frame af = { AST_FRAME_NULL, };
- ast_queue_frame(p->owner, &af);
+ ast_queue_frame(p->owner, &ast_null_frame);
}
} else {
/* It's possible we're getting an ACK after we've tried to disconnect
@@ -10353,7 +10351,6 @@
int res = 1;
struct ast_channel *c=NULL;
int gotdest;
- struct ast_frame af = { AST_FRAME_NULL, };
char *supported;
char *required;
unsigned int required_profile = 0;
@@ -10445,7 +10442,7 @@
/* Queue NULL frame to prod ast_rtp_bridge if appropriate */
if (p->owner)
- ast_queue_frame(p->owner, &af);
+ ast_queue_frame(p->owner, &ast_null_frame);
/* Initialize the context if it hasn't been already */
if (ast_strlen_zero(p->context))
Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?rev=9004&r1=9003&r2=9004&view=diff
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Tue Jan 31 11:57:12 2006
@@ -808,7 +808,6 @@
static void wakeup_sub(struct zt_pvt *p, int a, void *pri)
#endif
{
- struct ast_frame null = { AST_FRAME_NULL, };
#ifdef ZAPATA_PRI
if (pri)
ast_mutex_unlock(&pri->lock);
@@ -820,7 +819,7 @@
usleep(1);
ast_mutex_lock(&p->lock);
} else {
- ast_queue_frame(p->subs[a].owner, &null);
+ ast_queue_frame(p->subs[a].owner, &ast_null_frame);
ast_mutex_unlock(&p->subs[a].owner->lock);
break;
}
More information about the svn-commits
mailing list