Tiny optimization in chan_iax2.c that the compiler would
authorJames Golovich <james@gnuinter.net>
Thu, 25 Mar 2004 18:10:52 +0000 (18:10 +0000)
committerJames Golovich <james@gnuinter.net>
Thu, 25 Mar 2004 18:10:52 +0000 (18:10 +0000)
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

index 2cd0ef8..c7d866a 100755 (executable)
@@ -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