Re: CVS commit: src/lib/libc/resolv

2009-10-24 Thread Antti Kantee
On Sat Oct 24 2009 at 01:35:37 -0400, Christos Zoulas wrote:
 Module Name:  src
 Committed By: christos
 Date: Sat Oct 24 05:35:37 UTC 2009
 
 Modified Files:
   src/lib/libc/resolv: res_data.c res_init.c res_private.h res_send.c
 
 Log Message:
 Add a knote to keep track when resolv.conf gets changed and re-initialize.
 While here fix a memory leak when calling res_vinit with an already inited
 res_state.

Does this mean firefox will continue working if I switch from wired to
wireless and my IP changes?

If so, can we have this in NetBSD 5.1? (and thanks!)


Re: CVS commit: src/lib/libc/resolv

2009-10-24 Thread Ty Sarna

On Oct 24, 2009, at 9:08 AM, Ty Sarna wrote:

Unfortunately there's no way for me to use this feature currently. I  
think it would be sufficient if __res_check() were exposed and  
returned a flag indicating wether there was a changed or not. I will  
want to do some filtering of the search list in some cases, and it'd  
be better to build up my private modified copy of the search list  
only when the config changes rather than trying to figure it out on  
every query.


Actually, better yet, return the time of last change instead of a  
flag. In the case of a threaded program that uses both the getXXX API  
and the low-level res_XXX api for some reason (perhaps MX lookups or  
something else not supported at the getXXX level), I guess it's  
possible that the nss module could end up res_get_state()'ing stale  
res_states multiple times and re-initing when it doesn't need to. 


Re: CVS commit: src/lib/libc/resolv

2009-10-24 Thread Christos Zoulas
In article 20091024131259.ga17...@cs.hut.fi,
Antti Kantee  po...@cs.hut.fi wrote:
On Sat Oct 24 2009 at 01:35:37 -0400, Christos Zoulas wrote:
 Module Name: src
 Committed By:christos
 Date:Sat Oct 24 05:35:37 UTC 2009
 
 Modified Files:
  src/lib/libc/resolv: res_data.c res_init.c res_private.h res_send.c
 
 Log Message:
 Add a knote to keep track when resolv.conf gets changed and re-initialize.
 While here fix a memory leak when calling res_vinit with an already inited
 res_state.

Does this mean firefox will continue working if I switch from wired to
wireless and my IP changes?

Yes, that is the point... If resolv.conf changes, programs keep working.

If so, can we have this in NetBSD 5.1? (and thanks!)

The change is small, but we should test it a few days before pulling it up.


christos