[asterisk-commits] cdr mysql.c: Apply cdrzone to start and answer (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 19 06:26:00 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6518 )
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
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 70dab1a..b8d9ce3 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -265,9 +265,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") ||
@@ -277,7 +275,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);
@@ -371,7 +370,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/6518
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I7de0a5adc89824a5f2b696fc22c80fc22dff36b0
Gerrit-Change-Number: 6518
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.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/5db80deb/attachment-0001.html>
More information about the asterisk-commits
mailing list