Module: kamailio
Branch: master
Commit: b0233733c606ff5b1d5c6310e81554525b4f6bc7
URL:
https://github.com/kamailio/kamailio/commit/b0233733c606ff5b1d5c6310e815545…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2016-07-04T09:41:51+02:00
Merge pull request #691 from giovannimele/master
db_unixodbc: detect DB disconnection with generic HY000 status
---
Modified: modules/db_unixodbc/dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b0233733c606ff5b1d5c6310e815545…
Patch:
https://github.com/kamailio/kamailio/commit/b0233733c606ff5b1d5c6310e815545…
---
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);