On Tue, 2008-11-18 at 04:33 +0100, Alina Friedrichsen wrote:
[...]
> > I think we should better add another label. Yes, "goto" is evil.
> 
> I think "goto" is the cleanest way to make a destruktor for a function
> in C. See the Linux kernel.

Ooooh, that opens a completely other discussion/analysis: What are good
use patterns of "goto"?
The accepted patterns in the kernel are only "cleanup and return".
I can well live with that but Joe Appdeveloper needs to be educated.

> > In the (somewhat) near future, I'm somewhat copying - more or less - the
> > non-blocking data write code from the txtinfo plugin to the httpinfo
> > plugin to get the blocking I/O out of the way there too.
> 
> Write a HTTP server library that can be shared by both plugins?

It would be more a "write data to a non-blocking FD" kind of "lib". We
need an user of that in the core - otherwise we have anopther chunk of
code in the core which is actually used only by plugins (and I don't
mean the plugin-util and parameter parsing code - there is more
infrastructure that is just there because one single plugin needs a hook
or some not-trivial accessor to some data structure somewhere).

> > I actually disable that (read: write 1 in there via /etc/sysctl.conf)
> > everywhere per default (if I'm root;-).
> 
> I disable it only in my new OpenWrt init.d-Script, if it should start
> an IPv6 and an IPv4 instance of the olsrd parallel, so that the
> plugins can bind to the same port. And after that I restore the old
> setting.
> 
> (The BusyBox daemons depend on thats enabled.)

I consider it a bug in the busybox daemons (or any other software) that
thy depend on such a global settings.

> > There were some some strange problem somewhere just because of this
> > AFAIK quite Linux-specific behaviour.
> 
> I think this feature is nice for the olsrd, so that I can say it
> should bind to the IPv6 port and IPv4 port, if run the olsrd for IPv6

Yes, and exactly that's the problem is some tool expects IPv4 and IPv6
two totally different stacks (which they technically are).
And at the point where IPv4 starts to get "legacy support" and $DAEMON
explicitly listens on 5 IPv6 addresses and 1 (legacy) IPv4 address it
gets inconsistent as .

>  meshing only. And I can say that it should bind to the IPv6 port
> only, so that a second IPv4 olsrd instance can bind to the IPv4 port.
> (I mine the ports of the plugins.)

Well, I didn't mean to imply that everyone should disable it (or that
that sysctl should go) - but in my simple pure IPv4 world with the only
IPv6 is what $DISTRIBUTION activates per default (and I didn't disable
it for whatever reason;-), it was more in the way.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




