From 6efee0907ddd1819f10ae92048bde05edb3b994c Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Sat, 12 Jan 2008 00:05:08 +0000 Subject: [PATCH] Add a connection timeout attribute, as that was what was intended with the login timeout, but ODBC divides it up into 2 different timeouts. (Closes issue #11745) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98467 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_odbc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/res/res_odbc.c b/res/res_odbc.c index 0faffe61d4..2d58ef9d30 100644 --- a/res/res_odbc.c +++ b/res/res_odbc.c @@ -507,6 +507,7 @@ static odbc_status odbc_obj_connect(struct odbc_obj *obj) return ODBC_FAIL; } SQLSetConnectAttr(obj->con, SQL_LOGIN_TIMEOUT, (SQLPOINTER *) 10, 0); + SQLSetConnectAttr(obj->con, SQL_ATTR_CONNECTION_TIMEOUT, (SQLPOINTER *) 10, 0); #ifdef NEEDTRACE SQLSetConnectAttr(obj->con, SQL_ATTR_TRACE, &enable, SQL_IS_INTEGER); SQLSetConnectAttr(obj->con, SQL_ATTR_TRACEFILE, tracefile, strlen(tracefile)); -- 2.47.3