[asterisk-commits] mmichelson: branch mmichelson/correct_sdp_answer r206701 - /team/mmichelson/c...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 15 13:39:22 CDT 2009
Author: mmichelson
Date: Wed Jul 15 13:39:19 2009
New Revision: 206701
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=206701
Log:
init_offered_media is overkill and redundant. SEVER.
Modified:
team/mmichelson/correct_sdp_answer/channels/chan_sip.c
Modified: team/mmichelson/correct_sdp_answer/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/mmichelson/correct_sdp_answer/channels/chan_sip.c?view=diff&rev=206701&r1=206700&r2=206701
==============================================================================
--- team/mmichelson/correct_sdp_answer/channels/chan_sip.c (original)
+++ team/mmichelson/correct_sdp_answer/channels/chan_sip.c Wed Jul 15 13:39:19 2009
@@ -5169,12 +5169,6 @@
SDP_IMAGE,
};
-static inline void init_offered_media(struct offered_media offered_media[], enum media_type index)
-{
- offered_media[index].offered = 1;
- *(offered_media[index].text) = '\0';
-}
-
static int get_ip_and_port_from_sdp(struct sip_request *req, const enum media_type media, struct sockaddr_in *sin)
{
const char *m;
@@ -5338,7 +5332,7 @@
if ((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
(sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1 && len > 0)) {
audio = TRUE;
- init_offered_media(p->offered_media, SDP_AUDIO);
+ p->offered_media[SDP_AUDIO].offered = TRUE;
numberofmediastreams++;
/* Found audio stream in this media definition */
portno = x;
@@ -5358,7 +5352,7 @@
(sscanf(m, "video %d RTP/AVP %n", &x, &len) == 1 && len >= 0)) {
/* If it is not audio - is it video ? */
ast_clear_flag(&p->flags[0], SIP_NOVIDEO);
- init_offered_media(p->offered_media, SDP_VIDEO);
+ p->offered_media[SDP_VIDEO].offered = TRUE;
numberofmediastreams++;
vportno = x;
/* Scan through the RTP payload types specified in a "m=" line: */
@@ -5377,7 +5371,7 @@
(sscanf(m, "image %d UDPTL t38%n", &x, &len) == 1 && len >= 0) )) {
if (debug)
ast_verbose("Got T.38 offer in SDP in dialog %s\n", p->callid);
- init_offered_media(p->offered_media, SDP_IMAGE);
+ p->offered_media[SDP_IMAGE].offered = TRUE;
udptlportno = x;
numberofmediastreams++;
@@ -6790,7 +6784,7 @@
vdest.sin_addr = p->ourip;
vdest.sin_port = vsin.sin_port;
}
- ast_build_string(&m_video_next, &m_video_left, "m=video %d RTP/AVP", ntohs(vdest.sin_port));
+ ast_build_string(&m_video_next, &m_video_left, "m=video %d RTP/AVP", ntohs(vsin.sin_port));
/* Build max bitrate string */
if (p->maxcallbitrate)
More information about the asterisk-commits
mailing list