]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Twould help if we actually documented how the new features in res_odbc actually work...
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 21 Sep 2006 23:24:41 +0000 (23:24 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 21 Sep 2006 23:24:41 +0000 (23:24 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43464 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configs/res_odbc.conf.sample
res/res_odbc.c

index 59d5c68c36c3930aac7bd86bb987810fc9247ee1..2642676bfdc03cfb6d400b4fc46f7fa239629159 100644 (file)
@@ -24,7 +24,17 @@ username => myuser
 password => mypass
 pre-connect => yes
 
-
+; Certain servers, such as MS SQL Server and Sybase use the TDS protocol, which
+; limits the number of active queries per connection to 1.  By setting up pools
+; of connections, Asterisk can be made to work with these servers.
+[sqlserver]
+enabled => no
+dsn => mickeysoft
+pooling => yes
+limit => 5
+username => oscar
+password => thegrouch
+pre-connect => yes
 
 
 
index 7b7b2cc129dd7923a8e6056081ae2f01b5600915..444e4f4d5483601c5df93aa2f01138a9a7b7352d 100644 (file)
@@ -235,7 +235,8 @@ static int load_odbc_config(void)
                        limit = 0;
                        for (v = ast_variable_browse(config, cat); v; v = v->next) {
                                if (!strcasecmp(v->name, "pooling")) {
-                                       pooling = 1;
+                                       if (ast_true(v->value))
+                                               pooling = 1;
                                } else if (!strcasecmp(v->name, "limit")) {
                                        sscanf(v->value, "%d", &limit);
                                        if (ast_true(v->value) && !limit) {