[asterisk-commits] cdr mysql.c: Apply cdrzone to start and answer (asterisk[14])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 19 06:35:03 CDT 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6486 )
Change subject: cdr_mysql.c: Apply cdrzone to start and answer
......................................................................
cdr_mysql.c: Apply cdrzone to start and answer
Change-Id: I7de0a5adc89824a5f2b696fc22c80fc22dff36b0
---
M addons/cdr_mysql.c
1 file changed, 4 insertions(+), 5 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, approved
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 26e8389..667e6a2 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -260,9 +260,7 @@
/* Need the type and value to determine if we want the raw value or not */
if (entry->staticvalue) {
value = ast_strdupa(entry->staticvalue);
- } else if ((!strcmp(cdrname, "answer") ||
- !strcmp(cdrname, "end") ||
- !strcmp(cdrname, "disposition") ||
+ } else if ((!strcmp(cdrname, "disposition") ||
!strcmp(cdrname, "amaflags")) &&
(strstr(entry->type, "int") ||
strstr(entry->type, "dec") ||
@@ -272,7 +270,8 @@
strstr(entry->type, "numeric") ||
strstr(entry->type, "fixed"))) {
ast_cdr_format_var(cdr, cdrname, &value, workspace, sizeof(workspace), 1);
- } else if (!strcmp(cdrname, "start")) {
+ } else if (!strcmp(cdrname, "start") || !strcmp(cdrname, "answer") ||
+ !strcmp(cdrname, "end")) {
struct ast_tm tm;
char timestr[128];
ast_localtime(&cdr->start, &tm, ast_str_strlen(cdrzone) ? ast_str_buffer(cdrzone) : NULL);
@@ -366,7 +365,7 @@
}
static int my_unload_module(int reload)
-{
+{
struct column *entry;
ast_cli_unregister_multiple(cdr_mysql_status_cli, sizeof(cdr_mysql_status_cli) / sizeof(struct ast_cli_entry));
--
To view, visit https://gerrit.asterisk.org/6486
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: merged
Gerrit-Change-Id: I7de0a5adc89824a5f2b696fc22c80fc22dff36b0
Gerrit-Change-Number: 6486
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Revin <alexandr.revin at gmail.com>
Gerrit-Reviewer: Aleksandr Revin <alexandr.revin at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170919/dff79d40/attachment-0001.html>
More information about the asterisk-commits
mailing list