Module: kamailio
Branch: master
Commit: 0fc0c7b3d3d6ded300c46f504406447670fee4e8
URL:
https://github.com/kamailio/kamailio/commit/0fc0c7b3d3d6ded300c46f504406447…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-07-09T10:50:14+08:00
Revert "db_mysql: fix check for enum MYSQL_OPT_SSL_CA for CentOS 7/5.5.x"
This reverts commit 5b2be5e2c716ad8f8502b3be3db5194eb8474d39.
The commit should check >= not <
---
Modified: src/modules/db_mysql/km_my_con.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0fc0c7b3d3d6ded300c46f504406447…
Patch:
https://github.com/kamailio/kamailio/commit/0fc0c7b3d3d6ded300c46f504406447…
---
diff --git a/src/modules/db_mysql/km_my_con.c b/src/modules/db_mysql/km_my_con.c
index 21ac5023c81..240d3f59a76 100644
--- a/src/modules/db_mysql/km_my_con.c
+++ b/src/modules/db_mysql/km_my_con.c
@@ -179,15 +179,15 @@ struct my_con *db_mysql_new_connection(const struct db_id *id)
#endif /* MYSQL_VERSION_ID */
#endif /* MARIADB_BASE_VERSION */
-#if(MYSQL_VERSION_ID < 50600)
+#ifdef MYSQL_OPT_SSL_CA
if(db_mysql_opt_ssl_ca)
mysql_options(
ptr->con, MYSQL_OPT_SSL_CA, (const void *)db_mysql_opt_ssl_ca);
#else
- LM_DBG("opt_ssl_ca option not supported by mysql version (value %s:%d) - "
+ LM_DBG("opt_ssl_ca option not supported by mysql version (value %s) - "
"ignoring\n",
- MYSQL_SERVER_VERSION, MYSQL_VERSION_ID);
-#endif /* MYSQL_VERSION_ID */
+ db_mysql_opt_ssl_ca);
+#endif /* MYSQL_OPT_SSL_CA */
#ifdef KSR_MYSQL_OPT_RECONNECT
/* set reconnect flag if enabled */