[svn-commits] mmichelson: branch mmichelson/correct_sdp_answer r206698 - /team/mmichelson/c...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jul 15 11:54:26 CDT 2009
Author: mmichelson
Date: Wed Jul 15 11:54:23 2009
New Revision: 206698
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=206698
Log:
A bit of cleanup. Use a single char buffer instead of two separate audio and video ones in add_sdp.
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=206698&r1=206697&r2=206698
==============================================================================
--- team/mmichelson/correct_sdp_answer/channels/chan_sip.c (original)
+++ team/mmichelson/correct_sdp_answer/channels/chan_sip.c Wed Jul 15 11:54:23 2009
@@ -6723,6 +6723,7 @@
size_t a_audio_left = sizeof(a_audio);
size_t a_video_left = sizeof(a_video);
size_t a_modem_left = sizeof(a_modem);
+ char dummy_answer[256];
int x;
int capability = 0;
@@ -6996,9 +6997,8 @@
add_line(resp, a_audio);
add_line(resp, hold);
} else if (p->offered_media[SDP_AUDIO].offered) {
- char dummy_audio[256];
- snprintf(dummy_audio, sizeof(dummy_audio), "m=audio 0 RTP/AVP %s\r\n", p->offered_media[SDP_AUDIO].text);
- add_line(resp, dummy_audio);
+ snprintf(dummy_answer, sizeof(dummy_answer), "m=audio 0 RTP/AVP %s\r\n", p->offered_media[SDP_AUDIO].text);
+ add_line(resp, dummy_answer);
add_line(resp, "a=inactive\r\n");
}
if (needvideo) { /* only if video response is appropriate */
@@ -7006,9 +7006,8 @@
add_line(resp, a_video);
add_line(resp, hold); /* Repeat hold for the video stream */
} else if (p->offered_media[SDP_VIDEO].offered) {
- char dummy_video[256];
- snprintf(dummy_video, sizeof(dummy_video), "m=video 0 RTP/AVP %s\r\n", p->offered_media[SDP_VIDEO].text);
- add_line(resp, dummy_video);
+ snprintf(dummy_answer, sizeof(dummy_answer), "m=video 0 RTP/AVP %s\r\n", p->offered_media[SDP_VIDEO].text);
+ add_line(resp, dummy_answer);
add_line(resp, "a=inactive\r\n");
}
if (add_t38) {
More information about the svn-commits
mailing list