Module: kamailio
Branch: master
Commit: d80376f9ea087328a0c46d97b908993baeb5b1b4
URL:
https://github.com/kamailio/kamailio/commit/d80376f9ea087328a0c46d97b908993…
Author: Giovanni Mele <giovanni.mele(a)nagra.com>
Committer: Giovanni Mele <giovanni.mele(a)nagra.com>
Date: 2016-07-01T14:51:12+02:00
db_unixodbc: detect DB disconnection with generic HY000 status
---
Modified: modules/db_unixodbc/dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d80376f9ea087328a0c46d97b908993…
Patch:
https://github.com/kamailio/kamailio/commit/d80376f9ea087328a0c46d97b908993…
---
diff --git a/modules/db_unixodbc/dbase.c b/modules/db_unixodbc/dbase.c
index f322ba3..3cddfff 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);