On Wed, 2007-07-25 at 03:17 +0200, tetzlav wrote:
> There is a small patch for the txtinfo-plugin (olsrd_0-5-2) to get the
> apart info-tables;
> neighbours, topology, hna, mid and routes
> by using
> wget -q -O - http://127.0.0.1:2006/hna
> or
> wget -q -O - http://127.0.0.1:2006/mid
> and so on...
> 
> The call without or wrong selector prints all available tables as before.
> So there is no longer need to parse the whole output all the time.
> Thanks to jow. ;)

Nice. Some comments and questions though:
- From the "strict C" department: since strstr(3) returns a pointer,
   comparing to NULL is more appropriate (though 0 is technically not
   wrong).
- strstr(3) is a basicylly substring search. I don't know if a mere
   substring search is not too broad. Personally I would define exact
   URLs (like the given ones) and check it more strict to be on the
right
   position in the request.
- From the department of "beautiful implementation": I wonder if it 
   wouldn't be nicer to put the functions + URL parts in a table, look
   for the (relevant part of the) given URL and call the associated
   function.
   If none is found, call all functions.
   If the sequence of the table resembles the current sequence, the
   output won't change AFAICS.

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




