[asterisk-commits] russell: branch group/newcdr r202148 - /team/group/newcdr/main/cel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jun 20 10:15:32 CDT 2009


Author: russell
Date: Sat Jun 20 10:15:29 2009
New Revision: 202148

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202148
Log:
constification, formatting tweaks ... annnnd i'm done for now

Modified:
    team/group/newcdr/main/cel.c

Modified: team/group/newcdr/main/cel.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/main/cel.c?view=diff&rev=202148&r1=202147&r2=202148
==============================================================================
--- team/group/newcdr/main/cel.c (original)
+++ team/group/newcdr/main/cel.c Sat Jun 20 10:15:29 2009
@@ -67,7 +67,7 @@
 
 static char cel_dateformat[256];
 
-static const char *cel_event_types[CEL_MAX_EVENT_IDS] = {
+static const char const *cel_event_types[CEL_MAX_EVENT_IDS] = {
 	[0]                        = "ALL",
 	[AST_CEL_CHANNEL_START]    = "CHAN_START",
 	[AST_CEL_CHANNEL_END]      = "CHAN_END",
@@ -96,7 +96,7 @@
 	[AST_CEL_LINKEDID_END]     = "LINKEDID_END",
 };
 
-static const char *cel_ama_flags[AST_CEL_AMA_FLAG_TOTAL] = {
+static const char const *cel_ama_flags[AST_CEL_AMA_FLAG_TOTAL] = {
 	[AST_CEL_AMA_FLAG_OMIT]          = "OMIT",
 	[AST_CEL_AMA_FLAG_BILLING]       = "BILLING",
 	[AST_CEL_AMA_FLAG_DOCUMENTATION] = "DOCUMENTATION",
@@ -138,6 +138,8 @@
 		return NULL;
 	case CLI_GENERATE:
 		return NULL;
+	case CLI_HANDLER:
+		break;
 	}
 
 	if (a->argc > 3) {
@@ -368,7 +370,7 @@
 /* this routine is only called to populate a dummy channel struct with the data,
    so the CEL func can grab the correct datum and have it substituted, the same as if
    a real channel were being used with the CEL func. What we do for re-use!! */
-struct ast_channel* ast_cel_fabricate_channel_from_event(const struct ast_event *event)
+struct ast_channel *ast_cel_fabricate_channel_from_event(const struct ast_event *event)
 {
 	enum ast_cel_event_type event_type;
 	struct timeval eventtime;
@@ -516,16 +518,16 @@
 			AST_EVENT_IE_CEL_EVENT_TIME, AST_EVENT_IE_PLTYPE_UINT, eventtime.tv_sec,
 			AST_EVENT_IE_CEL_EVENT_TIME_USEC, AST_EVENT_IE_PLTYPE_UINT, eventtime.tv_usec,
 			AST_EVENT_IE_CEL_USEREVENT_NAME, AST_EVENT_IE_PLTYPE_STR, udef,
-			AST_EVENT_IE_CEL_CIDNAME, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_name,""),
-			AST_EVENT_IE_CEL_CIDNUM, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_num,""),
-			AST_EVENT_IE_CEL_CIDANI, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_ani,""),
-			AST_EVENT_IE_CEL_CIDRDNIS, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_rdnis,""),
-			AST_EVENT_IE_CEL_CIDDNID, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_dnid,""),
+			AST_EVENT_IE_CEL_CIDNAME, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_name, ""),
+			AST_EVENT_IE_CEL_CIDNUM, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_num, ""),
+			AST_EVENT_IE_CEL_CIDANI, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_ani, ""),
+			AST_EVENT_IE_CEL_CIDRDNIS, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_rdnis, ""),
+			AST_EVENT_IE_CEL_CIDDNID, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_dnid, ""),
 			AST_EVENT_IE_CEL_EXTEN, AST_EVENT_IE_PLTYPE_STR, chan->exten,
 			AST_EVENT_IE_CEL_CONTEXT, AST_EVENT_IE_PLTYPE_STR, chan->context,
 			AST_EVENT_IE_CEL_CHANNAME, AST_EVENT_IE_PLTYPE_STR, chan->name,
-			AST_EVENT_IE_CEL_APPNAME, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->appl,""),
-			AST_EVENT_IE_CEL_APPDATA, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->data,""),
+			AST_EVENT_IE_CEL_APPNAME, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->appl, ""),
+			AST_EVENT_IE_CEL_APPDATA, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->data, ""),
 			AST_EVENT_IE_CEL_AMAFLAGS, AST_EVENT_IE_PLTYPE_UINT, chan->amaflags,
 			AST_EVENT_IE_CEL_ACCTCODE, AST_EVENT_IE_PLTYPE_STR, chan->accountcode,
 			AST_EVENT_IE_CEL_PEERACCT, AST_EVENT_IE_PLTYPE_STR, chan->peeraccount,




More information about the asterisk-commits mailing list