freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] fix for spurious server not found in configuration file
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] fix for spurious server not found in configuration file
- Date: Wed, 18 Nov 2009 13:49:44 +0100
2009/11/13 Christos Zoulas <christos AT zoulas.com>:
>
> Hello,
>
> I really don't want to list > 50 servers in my freetds.conf file to avoid
> seeing the message:
>
> Msg 20012, Level 2, State -1, Server OpenClient, Line -1
> Server name not found in configuration files.
>
> So, I added this to config.c (which was to actually do what the logging
> comment promised but did not deliver):
>
> Index: src/tds/config.c
> ===================================================================
> RCS file: /src/twosigma/cvsroot/external/public/freetds/src/tds/config.c,v
> retrieving revision 1.1.1.13
> retrieving revision 1.16
> diff -u -r1.1.1.13 -r1.16
> --- src/tds/config.c 13 Nov 2009 18:22:47 -0000 1.1.1.13
> +++ src/tds/config.c 13 Nov 2009 19:39:28 -0000 1.16
> @@ -195,7 +195,8 @@
> if (!tds_read_interfaces(tds_dstr_cstr(&login->server_name),
> connection)) {
> tdsdump_log(TDS_DBG_INFO1, "Failed to find [%s] in
> configuration files; trying '%s' instead.\n",
>
> tds_dstr_cstr(&login->server_name),
> tds_dstr_cstr(&connection->server_name));
> - tdserror(tds->tds_ctx, tds, TDSEINTF, 0);
> + if (!tds_read_conf_file(connection,
> tds_dstr_cstr(&connection->server_name)))
> + tdserror(tds->tds_ctx, tds, TDSEINTF, 0);
> }
> }
>
>
> So adding
> [SYBASE]
>
> to the bottom of your freetds.conf file will silence the nuisance.
>
> Best,
>
> christos
Mumble mumble... is the log correct ?? tds_read_config_info create a
TDSCONNECTION structure based on info from a TDSLOGIN which should
have a valid server_name. IMO if this server_name is not found in
either freetds.conf and interfaces an error should raise. If
server_name is null the default ("SYBASE") should be used... actually
the code does not work so :(
freddy77
-
[freetds] fix for spurious server not found in configuration file,
Christos Zoulas, 11/13/2009
- Re: [freetds] fix for spurious server not found in configuration file, Frediano Ziglio, 11/18/2009
- Re: [freetds] fix for spurious server not found in configuration file, James K. Lowden, 11/22/2009
Archive powered by MHonArc 2.6.24.