Module: kamailio
Branch: 5.0
Commit: 6f9f851cbd88a1bdd9e9dd2180b498e821a5686b
URL: https://github.com/kamailio/kamailio/commit/6f9f851cbd88a1bdd9e9dd2180b498e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-03T08:29:39+01:00
db_mysql: do not set reconnect field explicitely for newer mysql versions
- exposed with MariaDB 10.2
- include mysql.h instead of mysql_version.h
- reported by GH #1296
(cherry picked from commit c31535072a04273b52a5cbc015e7ed1423d5dc33)
---
Modified: src/modules/db_mysql/km_my_con.c
---
Diff: https://github.com/kamailio/kamailio/commit/6f9f851cbd88a1bdd9e9dd2180b498e…
Patch: https://github.com/kamailio/kamailio/commit/6f9f851cbd88a1bdd9e9dd2180b498e…
---
diff --git a/src/modules/db_mysql/km_my_con.c b/src/modules/db_mysql/km_my_con.c
index b5f586dcf2..38e6875a19 100644
--- a/src/modules/db_mysql/km_my_con.c
+++ b/src/modules/db_mysql/km_my_con.c
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2001-2004 iptel.org
* Copyright (C) 2008 1&1 Internet AG
*
@@ -14,8 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -28,7 +28,7 @@
#include "km_my_con.h"
#include "km_db_mysql.h"
-#include <mysql_version.h>
+#include <mysql.h>
#include "../../core/mem/mem.h"
#include "../../core/dprint.h"
#include "../../core/ut.h"
@@ -108,12 +108,17 @@ struct my_con* db_mysql_new_connection(const struct db_id* id)
rec = 1;
mysql_options(ptr->con, MYSQL_OPT_RECONNECT, &rec);
}
+#else
+ if (db_mysql_auto_reconnect)
+ ptr->con->reconnect = 1;
+ else
+ ptr->con->reconnect = 0;
#endif
- if (db_mysql_update_affected_found) {
+ if (db_mysql_update_affected_found) {
connection_flag |= CLIENT_FOUND_ROWS;
}
-
+
#if (MYSQL_VERSION_ID >= 40100)
if (!mysql_real_connect(ptr->con, host, id->username, id->password,
id->database, id->port, 0, connection_flag|CLIENT_MULTI_STATEMENTS)) {
@@ -127,11 +132,6 @@ struct my_con* db_mysql_new_connection(const struct db_id* id)
mysql_close(ptr->con);
goto err;
}
- /* force reconnection if enabled */
- if (db_mysql_auto_reconnect)
- ptr->con->reconnect = 1;
- else
- ptr->con->reconnect = 0;
LM_DBG("connection type is %s\n", mysql_get_host_info(ptr->con));
LM_DBG("protocol version is %d\n", mysql_get_proto_info(ptr->con));
Module: kamailio
Branch: master
Commit: c31535072a04273b52a5cbc015e7ed1423d5dc33
URL: https://github.com/kamailio/kamailio/commit/c31535072a04273b52a5cbc015e7ed1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-03T08:23:29+01:00
db_mysql: do not set reconnect field explicitely for newer mysql versions
- exposed with MariaDB 10.2
- include mysql.h instead of mysql_version.h
- reported by GH #1296
---
Modified: src/modules/db_mysql/km_my_con.c
---
Diff: https://github.com/kamailio/kamailio/commit/c31535072a04273b52a5cbc015e7ed1…
Patch: https://github.com/kamailio/kamailio/commit/c31535072a04273b52a5cbc015e7ed1…
---
diff --git a/src/modules/db_mysql/km_my_con.c b/src/modules/db_mysql/km_my_con.c
index b5f586dcf2..38e6875a19 100644
--- a/src/modules/db_mysql/km_my_con.c
+++ b/src/modules/db_mysql/km_my_con.c
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2001-2004 iptel.org
* Copyright (C) 2008 1&1 Internet AG
*
@@ -14,8 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -28,7 +28,7 @@
#include "km_my_con.h"
#include "km_db_mysql.h"
-#include <mysql_version.h>
+#include <mysql.h>
#include "../../core/mem/mem.h"
#include "../../core/dprint.h"
#include "../../core/ut.h"
@@ -108,12 +108,17 @@ struct my_con* db_mysql_new_connection(const struct db_id* id)
rec = 1;
mysql_options(ptr->con, MYSQL_OPT_RECONNECT, &rec);
}
+#else
+ if (db_mysql_auto_reconnect)
+ ptr->con->reconnect = 1;
+ else
+ ptr->con->reconnect = 0;
#endif
- if (db_mysql_update_affected_found) {
+ if (db_mysql_update_affected_found) {
connection_flag |= CLIENT_FOUND_ROWS;
}
-
+
#if (MYSQL_VERSION_ID >= 40100)
if (!mysql_real_connect(ptr->con, host, id->username, id->password,
id->database, id->port, 0, connection_flag|CLIENT_MULTI_STATEMENTS)) {
@@ -127,11 +132,6 @@ struct my_con* db_mysql_new_connection(const struct db_id* id)
mysql_close(ptr->con);
goto err;
}
- /* force reconnection if enabled */
- if (db_mysql_auto_reconnect)
- ptr->con->reconnect = 1;
- else
- ptr->con->reconnect = 0;
LM_DBG("connection type is %s\n", mysql_get_host_info(ptr->con));
LM_DBG("protocol version is %d\n", mysql_get_proto_info(ptr->con));
Hello kamailio folks
i am successfully storing and dumping messages for off line users using
msilo content type text/plain.
i want to store off-line messages for pictures and videos.
my particular queries are
1) is msilo store picture and videos? (i have observed blob in silo
database table which is used for pictures.
2) in case it does what will be declared in content type hdr parameter?
any help in this regard will highly be appreciated.
regards,
sscc
--
Sent from: http://sip-router.1086192.n5.nabble.com/Development-f28106.html
### Description
We experience the same issue as http://lists.opensips.org/pipermail/users/2015-September/032520.html
#### Log Messages
ERROR: regex [regex_mod.c:289]: load_pcres(): no more memory for patterns[10]
ERROR: regex [regex_mod.c:679]: mi_pcres_reload(): failed to reload pcres
### Possible Solutions
See their solution : https://github.com/OpenSIPS/opensips/commit/aa7429e0124478f999ba3737b10ae39…
### Additional Information
kamailio -v
version: kamailio 4.2.0 (x86_64/linux) 36e695
flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 36e695
compiled on 08:10:49 Sep 7 2016 with gcc 4.9.2
* **Operating System**:
uname -a
Linux abc 4.9.0-0.bpo.2-amd64 #1 SMP Debian 4.9.18-1~bpo8+1 (2017-04-10) x86_64 GNU/Linux
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1295