[asterisk-commits] juggie: branch group/NoLossCDR-Redux2 r104786 - /team/group/NoLossCDR-Redux2/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 27 14:52:59 CST 2008


Author: juggie
Date: Wed Feb 27 14:52:59 2008
New Revision: 104786

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104786
Log:
update cdr_pgsql & cdr_manager

Modified:
    team/group/NoLossCDR-Redux2/cdr/cdr_csv.c
    team/group/NoLossCDR-Redux2/cdr/cdr_manager.c
    team/group/NoLossCDR-Redux2/cdr/cdr_pgsql.c

Modified: team/group/NoLossCDR-Redux2/cdr/cdr_csv.c
URL: http://svn.digium.com/view/asterisk/team/group/NoLossCDR-Redux2/cdr/cdr_csv.c?view=diff&rev=104786&r1=104785&r2=104786
==============================================================================
--- team/group/NoLossCDR-Redux2/cdr/cdr_csv.c (original)
+++ team/group/NoLossCDR-Redux2/cdr/cdr_csv.c Wed Feb 27 14:52:59 2008
@@ -288,7 +288,7 @@
 #endif
 	if (build_csv_record(buf, sizeof(buf), cdr)) {
 		ast_log(LOG_WARNING, "Unable to create CSV record in %d bytes.  CDR not recorded!\n", (int)sizeof(buf));
-		return 0;
+		return AST_CDR_POST_FAILED;
 	}
 	
 	/* because of the absolutely unconditional need for the

Modified: team/group/NoLossCDR-Redux2/cdr/cdr_manager.c
URL: http://svn.digium.com/view/asterisk/team/group/NoLossCDR-Redux2/cdr/cdr_manager.c?view=diff&rev=104786&r1=104785&r2=104786
==============================================================================
--- team/group/NoLossCDR-Redux2/cdr/cdr_manager.c (original)
+++ team/group/NoLossCDR-Redux2/cdr/cdr_manager.c Wed Feb 27 14:52:59 2008
@@ -125,7 +125,7 @@
 	struct ast_channel dummy;
 
 	if (!enablecdr)
-		return 0;
+		return AST_CDR_POST_DISABLED;
 
 	ast_localtime(&cdr->start, &timeresult, NULL);
 	ast_strftime(strStartTime, sizeof(strStartTime), DATE_FORMAT, &timeresult);
@@ -171,7 +171,7 @@
 	    cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition),
 	    ast_cdr_flags2str(cdr->amaflags), cdr->uniqueid, cdr->userfield,buf);
 
-	return 0;
+	return AST_CDR_POST_OK;
 }
 
 static int unload_module(void)

Modified: team/group/NoLossCDR-Redux2/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/group/NoLossCDR-Redux2/cdr/cdr_pgsql.c?view=diff&rev=104786&r1=104785&r2=104786
==============================================================================
--- team/group/NoLossCDR-Redux2/cdr/cdr_pgsql.c (original)
+++ team/group/NoLossCDR-Redux2/cdr/cdr_pgsql.c Wed Feb 27 14:52:59 2008
@@ -274,7 +274,7 @@
 				conn = NULL;
 				connected = 0;
 				ast_mutex_unlock(&pgsql_lock);
-				return -1;
+				return AST_CDR_POST_FAILED;
 			}
 		}
 		result = PQexec(conn, sql);
@@ -297,12 +297,12 @@
 			}
 			ast_mutex_unlock(&pgsql_lock);
 			PQclear(result);
-			return -1;
+			return AST_CDR_POST_FAILED;
 		}
 		PQclear(result);
 	}
 	ast_mutex_unlock(&pgsql_lock);
-	return 0;
+	return AST_CDR_POST_OK;
 }
 
 static int unload_module(void)




More information about the asterisk-commits mailing list