Skip to Content.
Sympa Menu

freetds - Re: [freetds] idea: eliminate port/instance

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] idea: eliminate port/instance
  • Date: Mon, 6 Apr 2009 22:04:17 -0400

Frediano Ziglio wrote:
> 2009/4/4 James K. Lowden <jklowden AT freetds.org>:
> > 1. If port is numeric, it's a port.
> > 2. If port is non-numeric, try looking up the port with
> > getservbyname(3).
> >
> > 3. If getservbyname(3) fails, look up the port using the UDP instance
> > protocol.
>
> I personally don't like this way cause you can't specify a named
> instance if this instance correspond to a service entry.

Well, I doubt that's a very likely conflict. But I guess you're right.
We'll continue to ignore /etc/services.

> Perhaps it would be useful to always return error if port and instance
> are both specified.

Yeah, but how? tds_read_config_info() returns TDSCONNECTION*. We'd have
to stuff an error code in the structure.

OK, maybe not fprintf(stderr...). Maybe tdserror() instead. At least
tsql would print the message, as would any other properly written
application. We'll have to invent a few new error codes, though.

Regards,

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page