[svn-commits] russell: branch group/newcdr r202300 - /team/group/newcdr/cel/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jun 21 11:35:10 CDT 2009


Author: russell
Date: Sun Jun 21 11:35:00 2009
New Revision: 202300

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202300
Log:
Headers/formatting cleanup, note a bug in cel_sqlite3_custom

Modified:
    team/group/newcdr/cel/cel_custom.c
    team/group/newcdr/cel/cel_manager.c
    team/group/newcdr/cel/cel_pgsql.c
    team/group/newcdr/cel/cel_radius.c
    team/group/newcdr/cel/cel_sqlite3_custom.c
    team/group/newcdr/cel/cel_tds.c

Modified: team/group/newcdr/cel/cel_custom.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/cel/cel_custom.c?view=diff&rev=202300&r1=202299&r2=202300
==============================================================================
--- team/group/newcdr/cel/cel_custom.c (original)
+++ team/group/newcdr/cel/cel_custom.c Sun Jun 21 11:35:00 2009
@@ -55,7 +55,7 @@
 	AST_DECLARE_STRING_FIELDS(
 		AST_STRING_FIELD(filename);
 		AST_STRING_FIELD(format);
-		);
+	);
 	ast_mutex_t lock;
 	AST_RWLIST_ENTRY(cel_config) list;
 };

Modified: team/group/newcdr/cel/cel_manager.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/cel/cel_manager.c?view=diff&rev=202300&r1=202299&r2=202300
==============================================================================
--- team/group/newcdr/cel/cel_manager.c (original)
+++ team/group/newcdr/cel/cel_manager.c Sun Jun 21 11:35:00 2009
@@ -1,11 +1,12 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 2008 Digium, Inc
+ * Copyright (C) 2008 - 2009, Digium, Inc.
  *
  * Steve Murphy <murf at digium.com>
  * who freely borrowed code from the cdr equivalents
  *     (see cdr/cdr_manager.c)
+ *
  * See http://www.asterisk.org for more information about
  * the Asterisk project. Please do not directly contact
  * any of the maintainers of this project for assistance;
@@ -20,7 +21,7 @@
 /*! \file
  *
  * \brief Asterisk Channel Event records.
- * 
+ *
  * See also
  * \arg \ref AstCDR
  * \arg \ref AstAMI
@@ -31,11 +32,6 @@
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include <sys/types.h>
-#include <strings.h>
-#include <unistd.h>
-#include <time.h>
 
 #include "asterisk/channel.h"
 #include "asterisk/cel.h"
@@ -173,7 +169,7 @@
 }
 
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Asterisk Manager Interface CEL Backend",
-		.load = load_module,
-		.unload = unload_module,
-		.reload = reload,
-	       );
+	.load = load_module,
+	.unload = unload_module,
+	.reload = reload,
+);

Modified: team/group/newcdr/cel/cel_pgsql.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/cel/cel_pgsql.c?view=diff&rev=202300&r1=202299&r2=202300
==============================================================================
--- team/group/newcdr/cel/cel_pgsql.c (original)
+++ team/group/newcdr/cel/cel_pgsql.c Sun Jun 21 11:35:00 2009
@@ -44,13 +44,6 @@
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <time.h>
 
 #include <libpq-fe.h>
 
@@ -86,31 +79,31 @@
 
 static AST_RWLIST_HEAD_STATIC(psql_columns, columns);
 
-#define LENGTHEN_BUF1(size)                                               \
-	do {																\
-		/* Lengthen buffer, if necessary */								\
-		if (ast_str_strlen(sql) + size + 1 > ast_str_size(sql)) {		\
+#define LENGTHEN_BUF1(size) \
+	do { \
+		/* Lengthen buffer, if necessary */ \
+		if (ast_str_strlen(sql) + size + 1 > ast_str_size(sql)) { \
 			if (ast_str_make_space(&sql, ((ast_str_size(sql) + size + 3) / 512 + 1) * 512) != 0) { \
 				ast_log(LOG_ERROR, "Unable to allocate sufficient memory.  Insert CDR failed.\n"); \
-				ast_free(sql);											\
-				ast_free(sql2);											\
-				AST_RWLIST_UNLOCK(&psql_columns);						\
-				return;													\
-			}															\
-		}																\
+				ast_free(sql); \
+				ast_free(sql2); \
+				AST_RWLIST_UNLOCK(&psql_columns); \
+				return; \
+			} \
+		} \
 	} while (0)
 
-#define LENGTHEN_BUF2(size)                               \
-	do {																\
-		if (ast_str_strlen(sql2) + size + 1 > ast_str_size(sql2)) {		\
+#define LENGTHEN_BUF2(size) \
+	do { \
+		if (ast_str_strlen(sql2) + size + 1 > ast_str_size(sql2)) { \
 			if (ast_str_make_space(&sql2, ((ast_str_size(sql2) + size + 3) / 512 + 1) * 512) != 0) { \
 				ast_log(LOG_ERROR, "Unable to allocate sufficient memory.  Insert CDR failed.\n"); \
-				ast_free(sql);											\
-				ast_free(sql2);											\
-				AST_RWLIST_UNLOCK(&psql_columns);						\
-				return;													\
-			}															\
-		}																\
+				ast_free(sql); \
+				ast_free(sql2); \
+				AST_RWLIST_UNLOCK(&psql_columns); \
+				return; \
+			} \
+		} \
 	} while (0)
 
 static void pgsql_log(const struct ast_event *event, void *userdata)
@@ -566,7 +559,7 @@
 }
 
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "PostgreSQL CEL Backend",
-		.load = load_module,
-		.unload = unload_module,
-		.reload = reload,
-	       );
+	.load = load_module,
+	.unload = unload_module,
+	.reload = reload,
+);

Modified: team/group/newcdr/cel/cel_radius.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/cel/cel_radius.c?view=diff&rev=202300&r1=202299&r2=202300
==============================================================================
--- team/group/newcdr/cel/cel_radius.c (original)
+++ team/group/newcdr/cel/cel_radius.c Sun Jun 21 11:35:00 2009
@@ -34,13 +34,6 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Rev$")
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <time.h>
-#include <sys/types.h>
 #include <radiusclient-ng.h>
 
 #include "asterisk/channel.h"

Modified: team/group/newcdr/cel/cel_sqlite3_custom.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/cel/cel_sqlite3_custom.c?view=diff&rev=202300&r1=202299&r2=202300
==============================================================================
--- team/group/newcdr/cel/cel_sqlite3_custom.c (original)
+++ team/group/newcdr/cel/cel_sqlite3_custom.c Sun Jun 21 11:35:00 2009
@@ -64,6 +64,7 @@
 static sqlite3 *db = NULL;
 
 static char table[80];
+/*! XXX \bug Handling of this var is crash prone on reloads */
 static char *columns;
 static struct ast_event_sub *event_sub = NULL;
 

Modified: team/group/newcdr/cel/cel_tds.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/cel/cel_tds.c?view=diff&rev=202300&r1=202299&r2=202300
==============================================================================
--- team/group/newcdr/cel/cel_tds.c (original)
+++ team/group/newcdr/cel/cel_tds.c Sun Jun 21 11:35:00 2009
@@ -579,7 +579,7 @@
 }
 
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "FreeTDS CEL Backend",
-		.load = load_module,
-		.unload = unload_module,
-		.reload = reload,
-	       );
+	.load = load_module,
+	.unload = unload_module,
+	.reload = reload,
+);




More information about the svn-commits mailing list