[asterisk-commits] bbryant: trunk r125947 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 27 12:35:42 CDT 2008


Author: bbryant
Date: Fri Jun 27 12:35:41 2008
New Revision: 125947

URL: http://svn.digium.com/view/asterisk?view=rev&rev=125947
Log:
Small error in the function that converts peer transports to a string.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=125947&r1=125946&r2=125947
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jun 27 12:35:41 2008
@@ -2724,17 +2724,16 @@
 			return "TCP";
 		case SIP_TRANSPORT_TLS:
 			return "TLS";
-	}
-
-	if (peer->transports & (SIP_TRANSPORT_TLS | SIP_TRANSPORT_TCP))
-		return "TLS,TCP";
-	if (peer->transports & (SIP_TRANSPORT_TLS | SIP_TRANSPORT_UDP))
-		return "TLS,UDP";
-	if (peer->transports & (SIP_TRANSPORT_UDP | SIP_TRANSPORT_TCP))
-		return "TCP,UDP";
-
-	return peer->transports ? 
-		"TLS,TCP,UDP" : "UNKNOWN";
+		case SIP_TRANSPORT_UDP | SIP_TRANSPORT_TCP:
+			return "TCP,UDP";
+		case SIP_TRANSPORT_UDP | SIP_TRANSPORT_TLS:
+			return "TLS,UDP";
+		case SIP_TRANSPORT_TCP | SIP_TRANSPORT_TLS:
+			return "TLS,TCP";
+		default:
+			return peer->transports ? 
+				"TLS,TCP,UDP" : "UNKNOWN";	
+	}
 }
 
 static inline const char *get_transport(enum sip_transport t)




More information about the asterisk-commits mailing list