[asterisk-commits] russell: branch bbryant/sip-tcptls r73108 - /team/bbryant/sip-tcptls/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 3 11:00:02 CDT 2007


Author: russell
Date: Tue Jul  3 11:00:01 2007
New Revision: 73108

URL: http://svn.digium.com/view/asterisk?view=rev&rev=73108
Log:
use the sip_transport enum by name

Modified:
    team/bbryant/sip-tcptls/channels/chan_sip.c

Modified: team/bbryant/sip-tcptls/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/sip-tcptls/channels/chan_sip.c?view=diff&rev=73108&r1=73107&r2=73108
==============================================================================
--- team/bbryant/sip-tcptls/channels/chan_sip.c (original)
+++ team/bbryant/sip-tcptls/channels/chan_sip.c Tue Jul  3 11:00:01 2007
@@ -633,8 +633,15 @@
 #define DEC_CALL_RINGING 2
 #define INC_CALL_RINGING 3
 
+/*!< Define some SIP transports */
+enum sip_transport {
+	SIP_TRANSPORT_UDP = 1,
+	SIP_TRANSPORT_TCP = 1 << 1,
+	SIP_TRANSPORT_TLS = 1 << 2
+};
+
 struct sip_socket {
-	int type;
+	enum sip_transport type;
 	int fd;
 	short port;
 	struct server_instance *ser;
@@ -874,13 +881,6 @@
 #define sipdebug_config		ast_test_flag(&global_flags[1], SIP_PAGE2_DEBUG_CONFIG)
 #define sipdebug_console	ast_test_flag(&global_flags[1], SIP_PAGE2_DEBUG_CONSOLE)
 #define sipdebug_text		ast_test_flag(&global_flags[1], SIP_PAGE2_DEBUG_TEXT)
-
-/*!< Define some SIP transports */
-enum {
-	SIP_TRANSPORT_UDP = 1,
-	SIP_TRANSPORT_TCP = 1 << 1,
-	SIP_TRANSPORT_TLS = 1 << 2
-};
 
 /*! \brief T38 States for a call */
 enum t38state {
@@ -1112,7 +1112,6 @@
 struct sip_user {
 	/* Users who can access various contexts */
 	ASTOBJ_COMPONENTS(struct sip_user);
-	int transport;
 	char secret[80];		/*!< Password */
 	char md5secret[80];		/*!< Password in md5 */
 	char context[AST_MAX_CONTEXT];	/*!< Default context for incoming calls */
@@ -1146,7 +1145,7 @@
 struct sip_peer {
 	ASTOBJ_COMPONENTS(struct sip_peer);	/*!< name, refcount, objflags,  object pointers */
 					/*!< peer->name is the unique name of this object */
-	int transport;
+	enum sip_transport transport;
 	char secret[80];		/*!< Password */
 	char md5secret[80];		/*!< Password in MD5 */
 	struct sip_auth *auth;		/*!< Realm authentication list */
@@ -16960,7 +16959,6 @@
 	user->maxcallbitrate = default_maxcallbitrate;
 	user->autoframing = global_autoframing;
 	user->prefs = default_prefs;
-	user->transport = SIP_TRANSPORT_UDP;
 	/* set default context */
 	strcpy(user->context, default_context);
 	strcpy(user->language, default_language);




More information about the asterisk-commits mailing list