[asterisk-commits] nadi: branch group/trunk-cm-csel-hash r47092 - /team/group/trunk-cm-csel-hash...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 3 09:07:35 MST 2006


Author: nadi
Date: Fri Nov  3 10:07:34 2006
New Revision: 47092

URL: http://svn.digium.com/view/asterisk?rev=47092&view=rev
Log:
nicer events logging

Modified:
    team/group/trunk-cm-csel-hash/channels/chan_misdn.c

Modified: team/group/trunk-cm-csel-hash/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/channels/chan_misdn.c?rev=47092&r1=47091&r2=47092&view=diff
==============================================================================
--- team/group/trunk-cm-csel-hash/channels/chan_misdn.c (original)
+++ team/group/trunk-cm-csel-hash/channels/chan_misdn.c Fri Nov  3 10:07:34 2006
@@ -811,78 +811,76 @@
 static const char * event2str (int event)
 {
 	static char *mevents[] = {
-		"EVENT_NOTHING",
-		"EVENT_TONE_GENERATE",
-		"EVENT_BCHAN_DATA",
-		"EVENT_BCHAN_ACTIVATED",
-		"EVENT_BCHAN_ERROR",
-		"EVENT_CLEANUP",
-		"EVENT_PROCEEDING",
-		"EVENT_PROGRESS",
-		"EVENT_SETUP",
-		"EVENT_ALERTING",
-		"EVENT_CONNECT",
-		"EVENT_SETUP_ACKNOWLEDGE",
-		"EVENT_CONNECT_ACKNOWLEDGE ",
-		"EVENT_USER_INFORMATION",
-		"EVENT_SUSPEND_REJECT",
-		"EVENT_RESUME_REJECT",
-		"EVENT_HOLD",
-		"EVENT_SUSPEND",
-		"EVENT_RESUME",
-		"EVENT_HOLD_ACKNOWLEDGE",
-		"EVENT_SUSPEND_ACKNOWLEDGE",
-		"EVENT_RESUME_ACKNOWLEDGE",
-		"EVENT_HOLD_REJECT",
-		"EVENT_RETRIEVE",
-		"EVENT_RETRIEVE_ACKNOWLEDGE",
-		"EVENT_RETRIEVE_REJECT",
-		"EVENT_DISCONNECT",
-		"EVENT_RESTART",
-		"EVENT_RELEASE",
-		"EVENT_RELEASE_COMPLETE",
-		"EVENT_FACILITY",
-		"EVENT_NOTIFY",
-		"EVENT_STATUS_ENQUIRY",
-		"EVENT_INFORMATION",
-		"EVENT_STATUS",
-		"EVENT_TIMEOUT",
-		"EVENT_DTMF_TONE",
-		"EVENT_NEW_L3ID",
-		"EVENT_NEW_BC",
-		"EVENT_PORT_ALARM",
-		"EVENT_NEW_CHANNEL",
-		"EVENT_UNKNOWN"
+		"NOTHING",
+		"TONE_GENERATE",
+		"BCHAN_DATA",
+		"BCHAN_ACTIVATED",
+		"BCHAN_ERROR",
+		"CLEANUP",
+		"PROCEEDING",
+		"PROGRESS",
+		"SETUP",
+		"ALERTING",
+		"CONNECT",
+		"SETUP_ACKNOWLEDGE",
+		"CONNECT_ACKNOWLEDGE ",
+		"USER_INFORMATION",
+		"SUSPEND_REJECT",
+		"RESUME_REJECT",
+		"HOLD",
+		"SUSPEND",
+		"RESUME",
+		"HOLD_ACKNOWLEDGE",
+		"SUSPEND_ACKNOWLEDGE",
+		"RESUME_ACKNOWLEDGE",
+		"HOLD_REJECT",
+		"RETRIEVE",
+		"RETRIEVE_ACKNOWLEDGE",
+		"RETRIEVE_REJECT",
+		"DISCONNECT",
+		"RESTART",
+		"RELEASE",
+		"RELEASE_COMPLETE",
+		"FACILITY",
+		"NOTIFY",
+		"STATUS_ENQUIRY",
+		"INFORMATION",
+		"STATUS",
+		"TIMEOUT",
+		"DTMF_TONE",
+		"NEW_L3ID",
+		"NEW_BC",
+		"PORT_ALARM",
+		"NEW_CHANNEL",
+		"UNKNOWN"
 	};
 
 	static char *aevents[] = {
-		"AEVENT_NOTHING",
-		"AEVENT_CALL",
-		"AEVENT_HANGUP",
-		"AEVENT_ANSWER",
-		"AEVENT_CBUSY",
-		"AEVENT_CRING",
-		"AEVENT_CRINGING",
-		"AEVENT_CANSWER",
-		"AEVENT_CTAKEOFFHOOK",
-		"AEVENT_COFFHOOK",
-		"AEVENT_CFLASH",
-		"AEVENT_CPROGRESS",
-		"AEVENT_CPROCEEDING",
-		"AEVENT_CCONGESTION",
-		"AEVENT_CHOLD",
-		"AEVENT_CUNHOLD",
-		"AEVENT_UNKNOWN",
+		"NOTHING",
+		"CALL",
+		"HANGUP",
+		"ANSWER",
+		"CONTROL_BUSY",
+		"CONTROL_RING",
+		"CONTROL_RINGING",
+		"CONTROL_ANSWER",
+		"CONTROL_TAKEOFFHOOK",
+		"CONTROL_OFFHOOK",
+		"CONTROL_FLASH",
+		"CONTROL_PROGRESS",
+		"CONTROL_PROCEEDING",
+		"CONTROL_CONGESTION",
+		"CONTROL_HOLD",
+		"CONTROL_UNHOLD",
+		"UNKNOWN",
 	};
-
-	static char unknown[] = "<UNKNOWN>";
 
 	if (event >= EVENT_NOTHING && event <= EVENT_UNKNOWN)
 		return mevents[event];
 	else if (event >= AEVENT_NOTHING && event <= AEVENT_UNKNOWN)
 		return aevents[event - AEVENT_NOTHING];
 	else
-		return unknown;
+		return mevents[EVENT_UNKNOWN];
 }
 
 static int send_event (void *p, int event)



More information about the asterisk-commits mailing list