Skip to Content.
Sympa Menu

freetds - Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem
  • Date: Mon, 28 Jan 2008 09:39:45 +0100

>
> >
> > Oh and James thanks for the patch and you help also last
> week. It is
> > appreciated.
> >
> > Thanks,
> > Eric Middleton
> > Oncology Supply Automation
> > Cell: 334-790-7587
> >
>
> Try also this patch
>
> Index: src/tds/config.c
> ===================================================================
> RCS file: /cvsroot/freetds/freetds/src/tds/config.c,v
> retrieving revision 1.132
> diff -u -1 -0 -r1.132 config.c
> --- src/tds/config.c 23 Dec 2007 21:12:02 -0000 1.132
> +++ src/tds/config.c 25 Jan 2008 08:56:31 -0000
> @@ -525,29 +525,31 @@
> tds_dstr_copy(&connection->client_charset, value);
> tdsdump_log(TDS_DBG_INFO1, "tds_config_login: %s is
> %s.\n", option, tds_dstr_cstr(&connection->client_charset));
> } else if (!strcmp(option, TDS_STR_LANGUAGE)) {
> tds_dstr_copy(&connection->language, value);
> } else if (!strcmp(option, TDS_STR_APPENDMODE)) {
> tds_g_append_mode = tds_config_boolean(value);
> } else if (!strcmp(option, TDS_STR_INSTANCE)) {
> tds_dstr_copy(&connection->instance_name, value);
> } else if (!strcmp(option, TDS_STR_ENCRYPTION)) {
> tds_config_encryption(value, connection);
> + } else if (!strcmp(option, "asa database")) {
> + tds_dstr_copy(&connection->server_name, value);
> } else {
> tdsdump_log(TDS_DBG_INFO1, "UNRECOGNIZED
> option '%s' ...
> ignoring.\n", option);
> }
> }
>
> static void
> tds_config_login(TDSCONNECTION * connection, TDSLOGIN * login)
> {
> - if (!tds_dstr_isempty(&login->server_name)) {
> + if (!tds_dstr_isempty(&login->server_name) &&
> tds_dstr_isempty(&connection->server_name)) {
> tds_dstr_dup(&connection->server_name,
> &login->server_name);
> }
> if (login->major_version || login->minor_version) {
> connection->major_version = login->major_version;
> connection->minor_version = login->minor_version;
> }
> if (!tds_dstr_isempty(&login->language)) {
> tds_dstr_dup(&connection->language, &login->language);
> }
> if (!tds_dstr_isempty(&login->server_charset)) {
>
> should allow "ASA Database = database_name" in freetds.conf
>

Is anyone willing to test this patch??

I think that if it works correctly is very useful, main problem with ASA
is due to servername limit...

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page