dect
/
asterisk
Archived
13
0
Fork 0

remove some more local declarations of null frames

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9004 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2006-01-31 17:57:12 +00:00
parent b55d2bd3ea
commit bd5352e51f
4 changed files with 7 additions and 14 deletions

View File

@ -3103,9 +3103,8 @@ static int iax2_setoption(struct ast_channel *c, int option, void *data, int dat
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)

View File

@ -224,9 +224,7 @@ static void check_bridge(struct local_pvt *p, int isoutbound)
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)

View File

@ -3758,12 +3758,11 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
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 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
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 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
#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 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
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 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
/* 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))

View File

@ -808,7 +808,6 @@ static void wakeup_sub(struct zt_pvt *p, int a, struct zt_pri *pri)
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 @@ static void wakeup_sub(struct zt_pvt *p, int a, void *pri)
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;
}