[asterisk-commits] twilson: branch 1.6.1 r158135 - in /branches/1.6.1: ./ cdr/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 20 12:23:03 CST 2008


Author: twilson
Date: Thu Nov 20 12:23:03 2008
New Revision: 158135

URL: http://svn.digium.com/view/asterisk?view=rev&rev=158135
Log:
Merged revisions 158072 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r158072 | twilson | 2008-11-20 11:48:58 -0600 (Thu, 20 Nov 2008) | 2 lines
  
  Begin on a crusade to end trailing whitespace!
........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/cdr/Makefile
    branches/1.6.1/cdr/cdr_adaptive_odbc.c
    branches/1.6.1/cdr/cdr_csv.c
    branches/1.6.1/cdr/cdr_custom.c
    branches/1.6.1/cdr/cdr_manager.c
    branches/1.6.1/cdr/cdr_odbc.c
    branches/1.6.1/cdr/cdr_pgsql.c
    branches/1.6.1/cdr/cdr_radius.c
    branches/1.6.1/cdr/cdr_sqlite.c
    branches/1.6.1/cdr/cdr_sqlite3_custom.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/Makefile?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/Makefile (original)
+++ branches/1.6.1/cdr/Makefile Thu Nov 20 12:23:03 2008
@@ -1,6 +1,6 @@
 #
 # Asterisk -- A telephony toolkit for Linux.
-# 
+#
 # Makefile for CDR backends
 #
 # Copyright (C) 1999-2006, Digium, Inc.

Modified: branches/1.6.1/cdr/cdr_adaptive_odbc.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_adaptive_odbc.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_adaptive_odbc.c (original)
+++ branches/1.6.1/cdr/cdr_adaptive_odbc.c Thu Nov 20 12:23:03 2008
@@ -19,7 +19,7 @@
 /*! \file
  *
  * \brief Adaptive ODBC CDR backend
- * 
+ *
  * \author Tilghman Lesher <cdr_adaptive_odbc__v1 at the-tilghman.com>
  * \ingroup cdr_drivers
  */

Modified: branches/1.6.1/cdr/cdr_csv.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_csv.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_csv.c (original)
+++ branches/1.6.1/cdr/cdr_csv.c Thu Nov 20 12:23:03 2008
@@ -23,7 +23,7 @@
  * \brief Comma Separated Value CDR records.
  *
  * \author Mark Spencer <markster at digium.com>
- * 
+ *
  * \arg See also \ref AstCDR
  * \ingroup cdr_drivers
  */
@@ -62,26 +62,26 @@
 
   "accountcode", 	accountcode is the account name of detail records, Master.csv contains all records *
   			Detail records are configured on a channel basis, IAX and SIP are determined by user *
-			DAHDI is determined by channel in dahdi.conf 
+			DAHDI is determined by channel in dahdi.conf
   "source",
   "destination",
-  "destination context", 
+  "destination context",
   "callerid",
   "channel",
   "destination channel",	(if applicable)
-  "last application",	Last application run on the channel 
-  "last app argument",	argument to the last channel 
-  "start time", 
-  "answer time", 
-  "end time", 
-  duration,   		Duration is the whole length that the entire call lasted. ie. call rx'd to hangup  
-  			"end time" minus "start time" 
-  billable seconds, 	the duration that a call was up after other end answered which will be <= to duration  
-  			"end time" minus "answer time" 
-  "disposition",    	ANSWERED, NO ANSWER, BUSY 
-  "amaflags",       	DOCUMENTATION, BILL, IGNORE etc, specified on a per channel basis like accountcode. 
-  "uniqueid",           unique call identifier 
-  "userfield"		user field set via SetCDRUserField 
+  "last application",	Last application run on the channel
+  "last app argument",	argument to the last channel
+  "start time",
+  "answer time",
+  "end time",
+  duration,   		Duration is the whole length that the entire call lasted. ie. call rx'd to hangup
+  			"end time" minus "start time"
+  billable seconds, 	the duration that a call was up after other end answered which will be <= to duration
+  			"end time" minus "answer time"
+  "disposition",    	ANSWERED, NO ANSWER, BUSY
+  "amaflags",       	DOCUMENTATION, BILL, IGNORE etc, specified on a per channel basis like accountcode.
+  "uniqueid",           unique call identifier
+  "userfield"		user field set via SetCDRUserField
 ----------------------------------------------------------*/
 
 static char *name = "csv";
@@ -110,7 +110,7 @@
 		ast_config_destroy(cfg);
 		return 0;
 	}
-	
+
 	if ((tmp = ast_variable_retrieve(cfg, "csv", "usegmtime"))) {
 		usegmtime = ast_true(tmp);
 		if (usegmtime)
@@ -238,7 +238,7 @@
 		append_string(buf, cdr->uniqueid, bufsize);
 	/* append the user field */
 	if(loguserfield)
-		append_string(buf, cdr->userfield,bufsize);	
+		append_string(buf, cdr->userfield,bufsize);
 	/* If we hit the end of our buffer, log an error */
 	if (strlen(buf) < bufsize - 5) {
 		/* Trim off trailing comma */
@@ -290,7 +290,7 @@
 		ast_log(LOG_WARNING, "Unable to create CSV record in %d bytes.  CDR not recorded!\n", (int)sizeof(buf));
 		return 0;
 	}
-	
+
 	/* because of the absolutely unconditional need for the
 	   highest reliability possible in writing billing records,
 	   we open write and close the log file each time */
@@ -305,7 +305,7 @@
 		ast_mutex_unlock(&mf_lock);
 		ast_log(LOG_ERROR, "Unable to re-open master file %s : %s\n", csvmaster, strerror(errno));
 	}
-	
+
 	if (!ast_strlen_zero(cdr->accountcode)) {
 		if (writefile(buf, cdr->accountcode))
 			ast_log(LOG_WARNING, "Unable to write CSV record to account file '%s' : %s\n", cdr->accountcode, strerror(errno));
@@ -324,7 +324,7 @@
 static int load_module(void)
 {
 	int res;
-	
+
 	if(!load_config(0))
 		return AST_MODULE_LOAD_DECLINE;
 

Modified: branches/1.6.1/cdr/cdr_custom.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_custom.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_custom.c (original)
+++ branches/1.6.1/cdr/cdr_custom.c Thu Nov 20 12:23:03 2008
@@ -57,7 +57,7 @@
 static char master[PATH_MAX];
 static char format[1024]="";
 
-static int load_config(int reload) 
+static int load_config(int reload)
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
@@ -80,7 +80,7 @@
 				strcat(format,"\n");
 				snprintf(master, sizeof(master),"%s/%s/%s", ast_config_AST_LOG_DIR, name, var->name);
 				if (var->next) {
-					ast_log(LOG_NOTICE, "Sorry, only one mapping is supported at this time, mapping '%s' will be ignored at line %d.\n", var->next->name, var->next->lineno); 
+					ast_log(LOG_NOTICE, "Sorry, only one mapping is supported at this time, mapping '%s' will be ignored at line %d.\n", var->next->name, var->next->lineno);
 					break;
 				}
 			} else
@@ -96,7 +96,7 @@
 			ast_log(LOG_WARNING, "Failed to load configuration file. Module not activated.\n");
 	}
 	ast_mutex_unlock(&lock);
-	
+
 	return res;
 }
 
@@ -153,7 +153,7 @@
 		if (res)
 			ast_log(LOG_ERROR, "Unable to register custom CDR handling\n");
 		return res;
-	} else 
+	} else
 		return AST_MODULE_LOAD_DECLINE;
 }
 

Modified: branches/1.6.1/cdr/cdr_manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_manager.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_manager.c (original)
+++ branches/1.6.1/cdr/cdr_manager.c Thu Nov 20 12:23:03 2008
@@ -17,7 +17,7 @@
 /*! \file
  *
  * \brief Asterisk Call Manager CDR records.
- * 
+ *
  * See also
  * \arg \ref AstCDR
  * \arg \ref AstAMI
@@ -75,14 +75,14 @@
 		enablecdr = 0;
 		return 0;
 	}
-	
+
 	while ( (cat = ast_category_browse(cfg, cat)) ) {
 		if (!strcasecmp(cat, "general")) {
 			v = ast_variable_browse(cfg, cat);
 			while (v) {
 				if (!strcasecmp(v->name, "enabled"))
 					newenablecdr = ast_true(v->value);
-				
+
 				v = v->next;
 			}
 		} else if (!strcasecmp(cat, "mappings")) {
@@ -97,13 +97,13 @@
 						ast_log(LOG_WARNING, "No more buffer space to add other custom fields\n");
 						break;
 					}
-					
+
 				}
 				v = v->next;
 			}
 		}
 	}
-	
+
 	ast_config_destroy(cfg);
 
 	if (enablecdr && !newenablecdr)
@@ -129,7 +129,7 @@
 
 	ast_localtime(&cdr->start, &timeresult, NULL);
 	ast_strftime(strStartTime, sizeof(strStartTime), DATE_FORMAT, &timeresult);
-	
+
 	if (cdr->answer.tv_sec)	{
 		ast_localtime(&cdr->answer, &timeresult, NULL);
 		ast_strftime(strAnswerTime, sizeof(strAnswerTime), DATE_FORMAT, &timeresult);

Modified: branches/1.6.1/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_odbc.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_odbc.c (original)
+++ branches/1.6.1/cdr/cdr_odbc.c Thu Nov 20 12:23:03 2008
@@ -19,7 +19,7 @@
 /*! \file
  *
  * \brief ODBC CDR Backend
- * 
+ *
  * \author Brian K. West <brian at bkw.org>
  *
  * See also:
@@ -113,7 +113,7 @@
 	}
 
 	ODBC_res = SQLExecDirect(stmt, (unsigned char *)sqlcmd, SQL_NTS);
-	
+
 	if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
 		ast_verb(11, "cdr_odbc: Error in ExecDirect: %d\n", ODBC_res);
 		SQLFreeHandle(SQL_HANDLE_STMT, stmt);
@@ -165,7 +165,7 @@
 			break;
 		} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
 			break;
-	
+
 		var = ast_variable_browse(cfg, "global");
 		if (!var) {
 			/* nothing configured */

Modified: branches/1.6.1/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_pgsql.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_pgsql.c (original)
+++ branches/1.6.1/cdr/cdr_pgsql.c Thu Nov 20 12:23:03 2008
@@ -3,8 +3,8 @@
  *
  * Copyright (C) 2003 - 2006
  *
- * Matthew D. Hardeman <mhardemn at papersoft.com> 
- * Adapted from the MySQL CDR logger originally by James Sharp 
+ * Matthew D. Hardeman <mhardemn at papersoft.com>
+ * Adapted from the MySQL CDR logger originally by James Sharp
  *
  * Modified September 2003
  * Matthew D. Hardeman <mhardemn at papersoft.com>
@@ -22,9 +22,9 @@
 
 /*! \file
  *
- * \brief PostgreSQL CDR logger 
- * 
- * \author Matthew D. Hardeman <mhardemn at papersoft.com> 
+ * \brief PostgreSQL CDR logger
+ *
+ * \author Matthew D. Hardeman <mhardemn at papersoft.com>
  * \extref PostgreSQL http://www.postgresql.org/
  *
  * See also
@@ -132,7 +132,7 @@
 		int lensql, lensql2, sizesql = maxsize, sizesql2 = maxsize2, newsize;
 		char *sql = ast_calloc(sizeof(char), sizesql), *sql2 = ast_calloc(sizeof(char), sizesql2), *tmp, *value;
 		char buf[257], escapebuf[513];
- 
+
 		if (!sql || !sql2) {
 			if (sql) {
 				ast_free(sql);
@@ -142,10 +142,10 @@
 			}
 			return -1;
 		}
- 
+
 		lensql = snprintf(sql, sizesql, "INSERT INTO %s (", table);
 		lensql2 = snprintf(sql2, sizesql2, " VALUES (");
-  
+
 		AST_RWLIST_RDLOCK(&psql_columns);
 		AST_RWLIST_TRAVERSE(&psql_columns, cur, list) {
 			/* For fields not set, simply skip them */
@@ -164,7 +164,7 @@
 				}
 				continue;
 			}
-			
+
 			LENGTHEN_BUF1(strlen(cur->name) + 2);
 			lensql += snprintf(sql + lensql, sizesql - lensql, "\"%s\",", cur->name);
 

Modified: branches/1.6.1/cdr/cdr_radius.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_radius.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_radius.c (original)
+++ branches/1.6.1/cdr/cdr_radius.c Thu Nov 20 12:23:03 2008
@@ -21,7 +21,7 @@
  * \brief RADIUS CDR Support
  * \author Philippe Sultan
  * \extref The Radius Client Library - http://developer.berlios.de/projects/radiusclient-ng/
- * 
+ *
  * \arg See also \ref AstCDR
  * \ingroup cdr_drivers
  */
@@ -135,27 +135,27 @@
 
 
 	/* Start Time */
-	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT, 
+	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT,
 		ast_localtime(&cdr->start, &tm,
 			ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME) ? "GMT" : NULL));
 	if (!rc_avpair_add(rh, tosend, PW_AST_START_TIME, timestr, strlen(timestr), VENDOR_CODE))
 		return -1;
 
 	/* Answer Time */
-	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT, 
+	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT,
 		ast_localtime(&cdr->answer, &tm,
 			ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME) ? "GMT" : NULL));
 	if (!rc_avpair_add(rh, tosend, PW_AST_ANSWER_TIME, timestr, strlen(timestr), VENDOR_CODE))
 		return -1;
 
 	/* End Time */
-	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT, 
+	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT,
 		ast_localtime(&cdr->end, &tm,
 			ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME) ? "GMT" : NULL));
 	if (!rc_avpair_add(rh, tosend, PW_AST_END_TIME, timestr, strlen(timestr), VENDOR_CODE))
 		return -1;
 
- 	/* Duration */ 
+ 	/* Duration */
 	if (!rc_avpair_add(rh, tosend, PW_AST_DURATION, &cdr->duration, 0, VENDOR_CODE))
 		return -1;
 
@@ -186,7 +186,7 @@
 	}
 
 	/* Setting Acct-Session-Id & User-Name attributes for proper generation
-	   of Acct-Unique-Session-Id on server side */ 
+	   of Acct-Unique-Session-Id on server side */
 	/* Channel */
 	if (!rc_avpair_add(rh, tosend, PW_USER_NAME, &cdr->channel, strlen(cdr->channel), 0))
 		return -1;
@@ -207,7 +207,7 @@
 		ast_debug(1, "Unable to create RADIUS record. CDR not recorded!\n");
 		return result;
 	}
-	
+
 	result = rc_acct(rh, 0, tosend);
 	if (result != OK_RC)
 		ast_log(LOG_ERROR, "Failed to record Radius CDR record!\n");
@@ -235,9 +235,9 @@
 		if ((tmp = ast_variable_retrieve(cfg, "radius", "radiuscfg")))
 			ast_copy_string(radiuscfg, tmp, sizeof(radiuscfg));
 		ast_config_destroy(cfg);
-	} else 
+	} else
 		return AST_MODULE_LOAD_DECLINE;
-	
+
 	/* start logging */
 	rc_openlog("asterisk");
 
@@ -252,7 +252,7 @@
 		ast_log(LOG_NOTICE, "Cannot load radiusclient-ng dictionary file.\n");
 		return AST_MODULE_LOAD_DECLINE;
 	}
-	
+
 	res = ast_cdr_register(name, desc, radius_log);
 	return AST_MODULE_LOAD_SUCCESS;
 }

Modified: branches/1.6.1/cdr/cdr_sqlite.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_sqlite.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_sqlite.c (original)
+++ branches/1.6.1/cdr/cdr_sqlite.c Thu Nov 20 12:23:03 2008
@@ -20,14 +20,14 @@
 /*! \file
  *
  * \brief Store CDR records in a SQLite database.
- * 
+ *
  * \author Holger Schurig <hs4233 at mail.mn-solutions.de>
  * \extref SQLite http://www.sqlite.org/
  *
  * See also
  * \arg \ref Config_cdr
  * \arg http://www.sqlite.org/
- * 
+ *
  * Creates the database and table on-the-fly
  * \ingroup cdr_drivers
  *
@@ -149,7 +149,7 @@
 			break;
 		usleep(200);
 	}
-	
+
 	if (zErr) {
 		ast_log(LOG_ERROR, "cdr_sqlite: %s\n", zErr);
 		ast_free(zErr);
@@ -197,7 +197,7 @@
 
 		/* TODO: here we should probably create an index */
 	}
-	
+
 	res = ast_cdr_register(name, ast_module_info->description, sqlite_log);
 	if (res) {
 		ast_log(LOG_ERROR, "Unable to register SQLite CDR handling\n");

Modified: branches/1.6.1/cdr/cdr_sqlite3_custom.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/cdr/cdr_sqlite3_custom.c?view=diff&rev=158135&r1=158134&r2=158135
==============================================================================
--- branches/1.6.1/cdr/cdr_sqlite3_custom.c (original)
+++ branches/1.6.1/cdr/cdr_sqlite3_custom.c Thu Nov 20 12:23:03 2008
@@ -21,10 +21,10 @@
  * \brief Custom SQLite3 CDR records.
  *
  * \author Adapted by Alejandro Rios <alejandro.rios at avatar.com.co> and
- *  Russell Bryant <russell at digium.com> from 
+ *  Russell Bryant <russell at digium.com> from
  *  cdr_mysql_custom by Edward Eastman <ed at dm3.co.uk>,
  *	and cdr_sqlite by Holger Schurig <hs4233 at mail.mn-solutions.de>
- *	
+ *
  *
  * \arg See also \ref AstCDR
  *
@@ -178,7 +178,7 @@
 		ast_config_destroy(cfg);
 		return 0;
 	}
-	
+
 	/* Mapping must have a table name */
 	tmp = ast_variable_retrieve(cfg, "master", "table");
 	if (!ast_strlen_zero(tmp))




More information about the asterisk-commits mailing list