diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 69b235b27f8ce97c46d6a287f832fdf394bb26aa..ee167be5cb8414abdea8052793da560f82cdb8e1 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -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) diff --git a/channels/chan_local.c b/channels/chan_local.c index 98103d4cd14db7fc0b8c22e99a5bc6899778256f..bc082a29a931203eb3301f2b36591ec2b8513570 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -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) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 3a1b36b1d0d2d2b11b11abf94a2693f6dffe5116..7749919ac9d71982db3965df6dcdf6a9be231d25 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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)) diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 90f0801a75322a8f678ab47e3973a2e0f1e05721..fc44bd4f68c9e5dcfe60bee5a2b07828604fc79d 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -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; }