diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-21 16:31:59 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-21 16:31:59 +0000 |
commit | d7d2a99021c740cbf8d7cb40127cdc8aef099f90 (patch) | |
tree | e536da632f2bead10582ce72ec38905605a15194 | |
parent | b9fa06a1a3d48942d2a8c89cc3571728061805be (diff) |
Merged revisions 43409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r43409 | tilghman | 2006-09-21 11:18:19 -0500 (Thu, 21 Sep 2006) | 2 lines
TDS 0.64 updates
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@43410 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | cdr/cdr_tds.c | 10 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | configure.ac | 3 |
3 files changed, 13 insertions, 3 deletions
diff --git a/cdr/cdr_tds.c b/cdr/cdr_tds.c index 9ca5c2f32..2ac8481a8 100644 --- a/cdr/cdr_tds.c +++ b/cdr/cdr_tds.c @@ -320,7 +320,7 @@ static int mssql_disconnect(void) static int mssql_connect(void) { -#ifdef FREETDS_0_63 +#if (defined(FREETDS_0_63) || defined(FREETDS_0_64)) TDSCONNECTION *connection = NULL; #else TDSCONNECTINFO *connection = NULL; @@ -346,7 +346,11 @@ static int mssql_connect(void) tds_set_packet(login, 512); tds_set_version(login, 7, 0); +#ifdef FREETDS_0_64 + if (!(context = tds_alloc_context(NULL))) +#else if (!(context = tds_alloc_context())) +#endif { ast_log(LOG_ERROR, "tds_alloc_context() failed.\n"); goto connect_fail; @@ -369,7 +373,7 @@ static int mssql_connect(void) { ast_log(LOG_ERROR, "Failed to connect to MSSQL server.\n"); tds = NULL; /* freed by tds_connect() on error */ -#ifdef FREETDS_0_63 +#if (defined(FREETDS_0_63) || defined(FREETDS_0_64)) tds_free_connection(connection); #else tds_free_connect(connection); @@ -377,7 +381,7 @@ static int mssql_connect(void) connection = NULL; goto connect_fail; } -#ifdef FREETDS_0_63 +#if (defined(FREETDS_0_63) || defined(FREETDS_0_64)) tds_free_connection(connection); #else tds_free_connect(connection); @@ -27526,6 +27526,9 @@ fi if test "${PBX_FREETDS}" != "0"; then case `grep TDS_VERSION_NO ${FREETDS_DIR:-/usr/include}/tdsver.h` in + *0.64*) + FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64" + ;; *0.63*) FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_63" ;; diff --git a/configure.ac b/configure.ac index 167a402be..3218814fe 100644 --- a/configure.ac +++ b/configure.ac @@ -837,6 +837,9 @@ AST_EXT_LIB_CHECK([FREETDS], [tds], [tds_version], [tds.h]) if test "${PBX_FREETDS}" != "0"; then case `grep TDS_VERSION_NO ${FREETDS_DIR:-/usr/include}/tdsver.h` in + *0.64*) + FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64" + ;; *0.63*) FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_63" ;; |