Re: BUG: online detection



On Thu, 18 October 09:31 Jules Bean wrote:
> On Wed, Oct 17, 2001 at 09:21:03PM +0200, Pawel Salek wrote:
> >
> > On 2001.10.17 21:17 Ali Akcaagac wrote:
> > > if so, then this shouldnt be the issue. lets add the resolving
> > > again whenever pressing SEND or CHECK... so we are 100% sure
> > > that balsa operates under all conditions..
> >
> > Balsa does the dns resolution every time it connect to the server, not on
> > startup, AFAIK.
> 
> It very likely is DNS; that's the reason I have to restart my squid
> proxy every time I dial up.

Agreed.

> Does balsa, or some lib it uses, 'open' the resolver at start-up and
> then re-use it?

It just uses getaddrinfo (or gethostbyname) as does libESMTP.  The rest 
depends on the actual resolver.  Some versions in -lc open the resolver every 
time, sone initialise on first use and stay open till the app ends.  I have a 
feeling -lbind opens on first use.

>  Because I *think* that /etc/resolv.conf is read when
> the resolver is first opened, and if it changes (as my dial-up script
> changes it) then programs which have already opened it need to be
> restarted.

This is a symptom of the open on first use scenario.

> At least, almost every TCP/IP program I use needs to be restarted when
> I dial-up...

The best solution is to find a stub resolver and install that.  Some 
LDXXX_PATH magic might be needed.  A caching DNS server will also be needed.  
Stub resolvers perform DNS queries on *every* use.  I think one is distributed 
with BIND or some such package but its not the default.

This sort of stuff is hard to control with autoconf.  It will detect the 
functions in the libraries but there's no easy way to tell if it found a stub 
resolver or the "open once" variety.  Even on the same OS, different people 
may have installed different resolvers.

Brian



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]