[Asterisk-code-review] res pjsip sdp rtp.c: Fixup some whitespace. (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Thu Aug 6 11:53:20 CDT 2015
Joshua Colp has submitted this change and it was merged.
Change subject: res_pjsip_sdp_rtp.c: Fixup some whitespace.
......................................................................
res_pjsip_sdp_rtp.c: Fixup some whitespace.
Change-Id: Ib4eb7ef7dcaf93ddc26538f0a498aaf110d7a973
---
M res/res_pjsip_sdp_rtp.c
1 file changed, 14 insertions(+), 10 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Mark Michelson: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index c2991e5..652188d 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -237,13 +237,13 @@
}
ast_copy_pj_str(name, &rtpmap->enc_name, sizeof(name));
- if (strcmp(name,"telephone-event") == 0) {
- tel_event++;
- }
+ if (strcmp(name, "telephone-event") == 0) {
+ tel_event++;
+ }
ast_copy_pj_str(media, (pj_str_t*)&stream->desc.media, sizeof(media));
- ast_rtp_codecs_payloads_set_rtpmap_type_rate(codecs, NULL, pj_strtoul(&stream->desc.fmt[i]),
- media, name, options, rtpmap->clock_rate);
+ ast_rtp_codecs_payloads_set_rtpmap_type_rate(codecs, NULL,
+ pj_strtoul(&stream->desc.fmt[i]), media, name, options, rtpmap->clock_rate);
/* Look for an optional associated fmtp attribute */
if (!(attr = pjmedia_sdp_media_find_attr2(stream, "fmtp", &rtpmap->pt))) {
continue;
@@ -270,8 +270,8 @@
}
}
}
- if ((tel_event==0) && (session->endpoint->dtmf == AST_SIP_DTMF_AUTO)) {
- ast_rtp_instance_dtmf_mode_set(session_media->rtp, AST_RTP_DTMF_MODE_INBAND);
+ if (!tel_event && (session->endpoint->dtmf == AST_SIP_DTMF_AUTO)) {
+ ast_rtp_instance_dtmf_mode_set(session_media->rtp, AST_RTP_DTMF_MODE_INBAND);
}
/* Get the packetization, if it exists */
if ((attr = pjmedia_sdp_media_find_attr2(stream, "ptime", NULL))) {
@@ -329,7 +329,7 @@
}
ast_rtp_codecs_payloads_copy(&codecs, ast_rtp_instance_get_codecs(session_media->rtp),
- session_media->rtp);
+ session_media->rtp);
ast_format_cap_append_from_cap(session->req_caps, joint, AST_MEDIA_TYPE_UNKNOWN);
@@ -1138,8 +1138,12 @@
/* Add non-codec formats */
if (media_type != AST_MEDIA_TYPE_VIDEO) {
for (index = 1LL; index <= AST_RTP_MAX; index <<= 1) {
- if (!(noncodec & index) || (rtp_code = ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(session_media->rtp),
- 0, NULL, index)) == -1) {
+ if (!(noncodec & index)) {
+ continue;
+ }
+ rtp_code = ast_rtp_codecs_payload_code(
+ ast_rtp_instance_get_codecs(session_media->rtp), 0, NULL, index);
+ if (rtp_code == -1) {
continue;
}
--
To view, visit https://gerrit.asterisk.org/1014
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4eb7ef7dcaf93ddc26538f0a498aaf110d7a973
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list