[Asterisk-code-review] cdr mysql: Compile error because MYSQL PORT definition is mi... (asterisk[13])

Jenkins2 asteriskteam at digium.com
Thu Apr 12 05:19:28 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8767 )

Change subject: cdr_mysql: Compile error because MYSQL_PORT definition is missing
......................................................................

cdr_mysql: Compile error because MYSQL_PORT definition is missing

If it is not defined, it will add MYSQL_PORT definition. After some
research on MySQL/MariaDB development tree, I couldn't find any reference
to MYSQL_PORT definition in include files.

ASTERISK-27782 #close

Change-Id: Ieee56c836fc2e8bd021c456145bba04c6068bb77
---
M addons/cdr_mysql.c
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 53ea923..d72ee09 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -60,6 +60,14 @@
 
 #define DATE_FORMAT "%Y-%m-%d %T"
 
+#ifndef MYSQL_PORT
+# ifdef MARIADB_PORT
+#  define MYSQL_PORT MARIADB_PORT
+# else
+#  define MYSQL_PORT 3306
+# endif
+#endif
+
 AST_THREADSTORAGE(sql1_buf);
 AST_THREADSTORAGE(sql2_buf);
 AST_THREADSTORAGE(escape_buf);

-- 
To view, visit https://gerrit.asterisk.org/8767
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieee56c836fc2e8bd021c456145bba04c6068bb77
Gerrit-Change-Number: 8767
Gerrit-PatchSet: 2
Gerrit-Owner: Evandro César Arruda <ecarruda at gmail.com>
Gerrit-Reviewer: Evandro César Arruda <ecarruda at gmail.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180412/9d5fd7df/attachment-0001.html>


More information about the asterisk-code-review mailing list