[asterisk-commits] file: trunk r42583 - /trunk/main/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Sep 9 12:12:52 MST 2006


Author: file
Date: Sat Sep  9 14:12:52 2006
New Revision: 42583

URL: http://svn.digium.com/view/asterisk?rev=3D42583&view=3Drev
Log:
Optimize a bit

Modified:
    trunk/main/rtp.c

Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?rev=3D42583&r1=3D=
42582&r2=3D42583&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Sat Sep  9 14:12:52 2006
@@ -2000,8 +2000,7 @@
 	rtpheader[2] =3D htonl(rtp->ssrc); =

 =

 	for (i =3D 0; i < 2; i++) {
-		rtpheader[3] =3D htonl((digit << 24) | (0xa << 16) | (0));
-		rtpheader[3] |=3D htonl((rtp->send_duration));
+		rtpheader[3] =3D htonl((digit << 24) | (0xa << 16) | (rtp->send_duration=
));
 		res =3D sendto(rtp->s, (void *) rtpheader, hdrlen + 4, 0, (struct sockad=
dr *) &rtp->them, sizeof(rtp->them));
 		if (res < 0) =

 			ast_log(LOG_ERROR, "RTP Transmission error to %s:%d: %s\n",
@@ -2041,8 +2040,7 @@
         rtpheader[0] =3D htonl((2 << 30) | (1 << 23) | (rtp->send_payload =
<< 16) | (rtp->seqno));
         rtpheader[1] =3D htonl(rtp->lastdigitts);
         rtpheader[2] =3D htonl(rtp->ssrc);
-        rtpheader[3] =3D htonl((rtp->send_digit << 24) | (0xa << 16) | (0)=
);
-	rtpheader[3] |=3D htonl((rtp->send_duration));
+        rtpheader[3] =3D htonl((rtp->send_digit << 24) | (0xa << 16) | (rt=
p->send_duration));
 	rtpheader[0] =3D htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqn=
o));
 	=

 	/* Transmit */
@@ -2096,9 +2094,7 @@
 	rtpheader[0] =3D htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) =
| (rtp->seqno));
 	rtpheader[1] =3D htonl(rtp->lastdigitts);
 	rtpheader[2] =3D htonl(rtp->ssrc);
-	rtpheader[3] =3D htonl((digit << 24) | (0xa << 16) | (0));
-	/* Send duration to 100ms */
-	rtpheader[3] |=3D htonl((rtp->send_duration));
+	rtpheader[3] =3D htonl((digit << 24) | (0xa << 16) | (rtp->send_duration)=
);
 	/* Set end bit */
 	rtpheader[3] |=3D htonl((1 << 23));
 	rtpheader[0] =3D htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqn=
o));



More information about the asterisk-commits mailing list