From 82bf2663e3ccd3fb7d28f047b7c81849a239ad4f Mon Sep 17 00:00:00 2001 From: James Golovich <james@gnuinter.net> Date: Thu, 25 Mar 2004 18:10:52 +0000 Subject: [PATCH] Tiny optimization in chan_iax2.c that the compiler would probably take care of, but better that we do it git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2559 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_iax2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 2cd0ef80d1..c7d866a55e 100755 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -2751,12 +2751,10 @@ static int iax2_send(struct chan_iax2_pvt *pvt, struct ast_frame *f, unsigned in /* Acks' don't get retried */ if ((f->frametype == AST_FRAME_IAX) && (f->subclass == IAX_COMMAND_ACK)) fr->retries = -1; - if (f->frametype == AST_FRAME_VOICE) { + else if (f->frametype == AST_FRAME_VOICE) pvt->svoiceformat = f->subclass; - } - if (f->frametype == AST_FRAME_VIDEO) { + else if (f->frametype == AST_FRAME_VIDEO) pvt->svideoformat = f->subclass & ~0x1; - } if (now) { res = send_packet(fr); } else -- GitLab