[Asterisk-code-review] res hep: Capture actual transport type in use (asterisk[master])

Mark Michelson asteriskteam at digium.com
Tue Mar 21 14:01:51 CDT 2017


Mark Michelson has posted comments on this change. ( https://gerrit.asterisk.org/5275 )

Change subject: res_hep: Capture actual transport type in use
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/5275/1/res/res_hep_pjsip.c
File res/res_hep_pjsip.c:

PS1, Line 85: 		case PJSIP_TRANSPORT_IPV6:
            : 			return IPPROTO_IPV6;
This should be removed for a couple of reasons.

First, it's an error if a transport is ever set to PJSIP_TRANSPORT_IPV6. The PJSIP transport enum is unconventional. PJSIP_TRANSPORT_IPV6 is a modifier that can be added to another transport, not a standalone value.

Second, IPPROTO_IPV6 is not a helpful value to return when it's the transport protocol ID that is desired.

This does mess things up a bit because it means that you will not have all enum values covered by the switch statement. You can probably get away with adding a default case that returns IPPROTO_UDP.


-- 
To view, visit https://gerrit.asterisk.org/5275
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54bbb0a001cfe4c6a87ad4b6f2014af233349978
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list