Module: kamailio
Branch: master
Commit: ab0de3872c62084cf5d53b0f263fd7edd70e2781
URL:
https://github.com/kamailio/kamailio/commit/ab0de3872c62084cf5d53b0f263fd7e…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2019-01-21T22:58:35+01:00
db_mysql: small unification for log macro usage for errors and warning
---
Modified: src/modules/db_mysql/db_mysql.c
Modified: src/modules/db_mysql/my_con.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ab0de3872c62084cf5d53b0f263fd7e…
Patch:
https://github.com/kamailio/kamailio/commit/ab0de3872c62084cf5d53b0f263fd7e…
---
diff --git a/src/modules/db_mysql/db_mysql.c b/src/modules/db_mysql/db_mysql.c
index 4a79a1878d..da130f1818 100644
--- a/src/modules/db_mysql/db_mysql.c
+++ b/src/modules/db_mysql/db_mysql.c
@@ -139,14 +139,14 @@ static int mysql_mod_init(void)
my_recv_to= DEFAULT_MY_RECV_TO;
}
} else if (my_recv_to || my_send_to) {
- LOG(L_WARN, "WARNING: mysql send or received timeout set, but "
+ LM_WARN("WARNING: mysql send or received timeout set, but "
" not supported by the installed mysql client library"
" (needed at least 4.1.22 or 5.0.25, but installed %ld)\n",
my_client_ver);
}
#else
if (my_recv_to || my_send_to) {
- LOG(L_WARN, "WARNING: mysql send or received timeout set, but "
+ LM_WARN("WARNING: mysql send or received timeout set, but "
" not supported by the mysql client library used to compile"
" the mysql module (needed at least 4.1.1 but "
" compiled against %ld)\n", MYSQL_VERSION_ID);
diff --git a/src/modules/db_mysql/my_con.c b/src/modules/db_mysql/my_con.c
index 0f0238aae8..d311f5b342 100644
--- a/src/modules/db_mysql/my_con.c
+++ b/src/modules/db_mysql/my_con.c
@@ -90,7 +90,7 @@ int my_con_connect(db_con_t* con)
if (!mysql_real_connect(mcon->con, muri->host, muri->username,
muri->password, muri->database, muri->port, 0, 0)) {
- LOG(L_ERR, "mysql: %s\n", mysql_error(mcon->con));
+ ERR("mysql: %s\n", mysql_error(mcon->con));
return -1;
}