Re: Blocking DNS lookup on MC startup
- From: Pavel Tsekov <ptsekov gmx net>
- To: Leonard den Ottolander <leonard den ottolander nl>
- Cc: MC development <mc-devel gnome org>
- Subject: Re: Blocking DNS lookup on MC startup
- Date: Mon, 5 Jun 2006 14:41:39 +0300 (EEST)
On Mon, 5 Jun 2006, Leonard den Ottolander wrote:
load_interfaces() is doing gethostbyname() for every single value of the
"interfaces" parameter of smb.conf. If interfaces doesn't contain an
ip_address/netmask pair load_interfaces() tries to resolve the value
via gethostbyname() :(
Are you referring to interpret_addr()?
Yes.
I'd say the case where the interface is identified by a name is a bit of
a corner case.
Not really. Please, look here:
http://mail.gnome.org/archives/mc-devel/2006-April/msg00036.html
http://mail.gnome.org/archives/mc/2006-May/msg00005.html
It seems historic samba didn't allow interface names in the
"interfaces" directive. However newer samba versions allow the
use of interface names and it is used by people. If you think
about it - it makes a lot of sense.
Another solution would be to delay the samba lib initialization until the
first samba request. This way it will be clearly visible for the user that
the hang is due to a samba request. Of course the initialization must be
made interruptable.
Opinions ?
I don't have any fundamental objections against delaying the
initialization of smbfs, but is it really worth the effort? Don't you
think we catch most cases with making the call to Get_Hostbyname() in
get_myname() conditional?
Unfortunately not.
Switching to a newer samba lib is another option. It has been discussed
in the past - at least in bugzilla there is an entry discussing a switch
to newer samba. Of course we can hack the intree samba lib but I think
it is not worth doing it.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]