[svn-commits] russell: trunk r45764 - /trunk/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Oct 20 08:54:14 MST 2006


Author: russell
Date: Fri Oct 20 10:54:14 2006
New Revision: 45764

URL: http://svn.digium.com/view/asterisk?rev=45764&view=rev
Log:
put the constants for whether methods can create a dialog or not in an enum

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=45764&r1=45763&r2=45764&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Oct 20 10:54:14 2006
@@ -338,16 +338,18 @@
 	REG_STATE_FAILED,	/*!< Registration failed after several tries */
 };
 
-#define CAN_NOT_CREATE_DIALOG	0
-#define CAN_CREATE_DIALOG	1
-#define CAN_CREATE_DIALOG_UNSUPPORTED_METHOD	2
+enum can_create_dialog {
+	CAN_NOT_CREATE_DIALOG,
+	CAN_CREATE_DIALOG,
+	CAN_CREATE_DIALOG_UNSUPPORTED_METHOD,
+};
 
 /*! XXX Note that sip_methods[i].id == i must hold or the code breaks */
 static const struct  cfsip_methods { 
 	enum sipmethod id;
 	int need_rtp;		/*!< when this is the 'primary' use for a pvt structure, does it need RTP? */
 	char * const text;
-	int can_create;
+	enum can_create_dialog can_create;
 } sip_methods[] = {
 	{ SIP_UNKNOWN,	 RTP,    "-UNKNOWN-", 	CAN_CREATE_DIALOG },
 	{ SIP_RESPONSE,	 NO_RTP, "SIP/2.0",	CAN_NOT_CREATE_DIALOG },



More information about the svn-commits mailing list