Module: kamailio
Branch: 4.4
Commit: e2874495b1ecad9e85b47f6d8bdb847fceb0c3ad
URL:
https://github.com/kamailio/kamailio/commit/e2874495b1ecad9e85b47f6d8bdb847…
Author: Giovanni Mele <giovanni.mele(a)nagra.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-07-05T11:50:41+02:00
db_unixodbc: detect DB disconnection with generic HY000 status
(cherry picked from commit d80376f9ea087328a0c46d97b908993baeb5b1b4)
---
Modified: modules/db_unixodbc/dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e2874495b1ecad9e85b47f6d8bdb847…
Patch:
https://github.com/kamailio/kamailio/commit/e2874495b1ecad9e85b47f6d8bdb847…
---
diff --git a/modules/db_unixodbc/dbase.c b/modules/db_unixodbc/dbase.c
index d5c7d27..304b4d4 100644
--- a/modules/db_unixodbc/dbase.c
+++ b/modules/db_unixodbc/dbase.c
@@ -138,7 +138,8 @@ static int db_unixodbc_submit_query(const db1_con_t* _h, const str*
_s)
/* Connection broken */
if( !strncmp((char*)sqlstate,"08003",5) ||
- !strncmp((char*)sqlstate,"08S01",5)
+ !strncmp((char*)sqlstate,"08S01",5) ||
+ !strncmp((char*)sqlstate,"HY000",5) /* ODBC 3 General error */
)
{
ret = reconnect(_h);