olsrd.git
11 years agoadd more timer cookies
Bernd Petrovitsch [Mon, 10 Nov 2008 22:39:05 +0000 (23:39 +0100)]
add more timer cookies

especially in some plugins

11 years agoGrrml:
Bernd Petrovitsch [Mon, 10 Nov 2008 22:13:41 +0000 (23:13 +0100)]
Grrml:
- make it work for older - pre-4.3.2 - gcc's
- actually add the -W to the correct variable

11 years agofix compile warnings for gcc-4.3.2
Bernd Petrovitsch [Mon, 10 Nov 2008 21:58:20 +0000 (22:58 +0100)]
fix compile warnings for gcc-4.3.2

Added a "round up to the power of 2" macro to fix some warnings.
Rewrite some code to avoid warnings.
1 warning is not really fiaxable -at least now.

11 years agofix comment
Bernd Petrovitsch [Mon, 10 Nov 2008 21:15:44 +0000 (22:15 +0100)]
fix comment

11 years agoadd a cookie for the 2-Hop Neighbor list expiration timer
Hannes Gredler [Mon, 10 Nov 2008 16:31:24 +0000 (17:31 +0100)]
add a cookie for the 2-Hop Neighbor list expiration timer

11 years agoallocate some cookies to reduce unknown timers
Hannes Gredler [Mon, 10 Nov 2008 14:33:38 +0000 (15:33 +0100)]
allocate some cookies to reduce unknown timers

11 years agoFactor out the buffer code and use it elsewhere
Bernd Petrovitsch [Sun, 9 Nov 2008 23:48:19 +0000 (00:48 +0100)]
Factor out the buffer code and use it elsewhere

We factor out the code of the auto-expanding buffer from the txtinfo plugin
into the core (and a few functions ....).
We use that for the config-file generation and while we are at it,
we clean it up.
And we use it in the httpinfo plugin.
This saves a few KB in the olsrd, httpinfo and txtinfo plugin.

11 years ago* killed an unused variable
Bernd Petrovitsch [Sun, 9 Nov 2008 23:25:11 +0000 (00:25 +0100)]
* killed an unused variable

11 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Sun, 9 Nov 2008 17:33:47 +0000 (18:33 +0100)]
Automated merge with http://gredler.at/hg/olsrd

11 years ago* killed an unused variable
Bernd Petrovitsch [Sun, 9 Nov 2008 17:32:35 +0000 (18:32 +0100)]
* killed an unused variable

11 years ago* Bug fix: That should be IMHO there.
Bernd Petrovitsch [Sun, 9 Nov 2008 17:31:59 +0000 (18:31 +0100)]
* Bug fix: That should be IMHO there.

11 years ago* we can eliminate more with #if
Bernd Petrovitsch [Sun, 9 Nov 2008 17:31:33 +0000 (18:31 +0100)]
* we can eliminate more with #if

11 years agoimported patch misc-cleanups
Bernd Petrovitsch [Fri, 7 Nov 2008 21:35:32 +0000 (22:35 +0100)]
imported patch misc-cleanups

11 years agofixed compile ergressions. Renamed the variables "sin" and "exp" to something different.
Bernd Petrovitsch [Thu, 6 Nov 2008 09:55:37 +0000 (10:55 +0100)]
fixed compile ergressions. Renamed the variables "sin" and "exp" to something different.
And we activate two more warnings.

11 years ago* we do not want math.h
Bernd Petrovitsch [Wed, 5 Nov 2008 12:23:43 +0000 (13:23 +0100)]
* we do not want math.h

11 years ago#if-0-out an unused function
Bernd Petrovitsch [Wed, 5 Nov 2008 01:16:48 +0000 (02:16 +0100)]
#if-0-out an unused function

11 years agoreduce local variables
Bernd Petrovitsch [Wed, 5 Nov 2008 01:15:45 +0000 (02:15 +0100)]
reduce local variables

We have already a "all_zero" to compare an IP address. So lets const-ify it
and use it everywhere instead of the local null_addr's.
And Win32 is different one more time. Workaround that too.

11 years agoimported patch mv-init
Bernd Petrovitsch [Wed, 5 Nov 2008 01:10:57 +0000 (02:10 +0100)]
imported patch mv-init

11 years agoinline olsr_hyst_calc_stability() and olsr_hyst_calc_instability()
Bernd Petrovitsch [Wed, 5 Nov 2008 01:10:30 +0000 (02:10 +0100)]
inline olsr_hyst_calc_stability() and olsr_hyst_calc_instability()

and clean it up a little bit.

11 years agokill raise(2) ...
Bernd Petrovitsch [Wed, 5 Nov 2008 01:09:22 +0000 (02:09 +0100)]
kill raise(2) ...

... and replace it with simple assignment. The signal handler does the same.

11 years agoFile cleanup
Bernd Petrovitsch [Wed, 5 Nov 2008 01:07:44 +0000 (02:07 +0100)]
File cleanup

- made olsr_hello_tap() "static" as it is only used locally
- syntax cleanup
- killed white space the line end

11 years agoCleanup tc_set.{c,h}
Bernd Petrovitsch [Wed, 5 Nov 2008 00:57:33 +0000 (01:57 +0100)]
Cleanup tc_set.{c,h}

- made olsr_bool delete_outdated_tc_edges()  "static" as it is used only locally
- made locally only used *_cookie "static"
- converted olsr_lock_tc_entry() and sr_unlock_tc_entry() to inline functions
- code cleanup

11 years agomake src/unix/ifnet.[ch] more readable
Bernd Petrovitsch [Wed, 5 Nov 2008 00:28:29 +0000 (01:28 +0100)]
make src/unix/ifnet.[ch] more readable

- comment out an unused funtion
- reformat src/unix/ifnet.c
- kill whitespace at the end-of-the-line

11 years agoCleanup of the dot-draw plugin
Bernd Petrovitsch [Wed, 5 Nov 2008 00:10:38 +0000 (01:10 +0100)]
Cleanup of the dot-draw plugin

- remove unnecessary #include's
- make ipc_connection a local variable as it's lifetime is just one function
- define variables in the most local block
- use olsr_ip_prefix_to_string()
- avoid unnecessary function calls

11 years agokill holes in data structures
Bernd Petrovitsch [Wed, 5 Nov 2008 00:11:46 +0000 (01:11 +0100)]
kill holes in data structures

and we add some config file checks

11 years agoIntroduce a real PREFIX variable
Bernd Petrovitsch [Tue, 4 Nov 2008 23:54:17 +0000 (00:54 +0100)]
Introduce a real PREFIX variable

- fixup the "rpm" target
- generate "Version" and "Release" into the .spec file
- generate the .spec file from a .spec.in as there is no other simple solution
- no need for dependencies for the "rpm" target
- kill the list-excludes.sh script - we don't need it with `hg`
- added more glob's - temp files of emacs'ens - to .hgigonre

11 years agokill a completely superflous event handler registration
Bernd Petrovitsch [Tue, 4 Nov 2008 23:47:28 +0000 (00:47 +0100)]
kill a completely superflous event handler registration

This saves *lots* if useless CPU waste.

11 years agofixed format string
Bernd Petrovitsch [Sat, 1 Nov 2008 01:05:36 +0000 (02:05 +0100)]
fixed format string

11 years ago Ooops, fix th compile breakage
Bernd Petrovitsch [Fri, 31 Oct 2008 23:32:19 +0000 (00:32 +0100)]
 Ooops, fix th compile breakage

11 years ago move olsr_times() into scheduler.[ch] - now_times is also there
Bernd Petrovitsch [Fri, 31 Oct 2008 23:26:59 +0000 (00:26 +0100)]
 move olsr_times() into scheduler.[ch] - now_times is also there

11 years agokilled a #define similar to olsr.c
Bernd Petrovitsch [Fri, 31 Oct 2008 22:50:41 +0000 (23:50 +0100)]
killed a #define similar to olsr.c

11 years agoWin32 compile fix
Bernd Petrovitsch [Fri, 31 Oct 2008 22:43:49 +0000 (23:43 +0100)]
Win32 compile fix

11 years ago* trivial: fixed HTML and grammar
Bernd Petrovitsch [Fri, 31 Oct 2008 17:05:33 +0000 (18:05 +0100)]
* trivial: fixed HTML and grammar

11 years ago* added support for EXTRA_LDFLAGS similar to the other EXTRA_ variables
Bernd Petrovitsch [Thu, 30 Oct 2008 16:41:01 +0000 (17:41 +0100)]
* added support for EXTRA_LDFLAGS similar to the other EXTRA_ variables

11 years ago* fixed a comment
Bernd Petrovitsch [Thu, 30 Oct 2008 16:39:27 +0000 (17:39 +0100)]
* fixed a comment

11 years agoCompare an int with an int (and not a float). And the comparison
Bernd Petrovitsch [Wed, 29 Oct 2008 13:17:46 +0000 (14:17 +0100)]
Compare an int with an int (and not a float). And the comparison
was always "false" anyways (and we got no compiler warning BTW).
Given the same comparison a few lines below, this seems better as
before to me.
And check first the cheaper check.

11 years ago- make locally only used olsr_add_mpr_selector() "static"
Bernd Petrovitsch [Tue, 28 Oct 2008 16:34:29 +0000 (17:34 +0100)]
- make locally only used olsr_add_mpr_selector() "static"
- syntax cleanup
- move initializations from the _init() func to the variable definition

11 years ago* killed debug stuff
Bernd Petrovitsch [Mon, 27 Oct 2008 23:28:13 +0000 (00:28 +0100)]
* killed debug stuff

11 years agoimported patch remove-superfluous-typecasts
Bernd Petrovitsch [Mon, 27 Oct 2008 21:49:40 +0000 (22:49 +0100)]
imported patch remove-superfluous-typecasts

11 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Mon, 27 Oct 2008 21:40:44 +0000 (22:40 +0100)]
Automated merge with http://gredler.at/hg/olsrd

11 years agofix build on Win32
Bernd Petrovitsch [Mon, 27 Oct 2008 21:40:26 +0000 (22:40 +0100)]
fix build on Win32

11 years agoadd a sample config for olsr_switch using hemu interfaces
Hannes Gredler [Mon, 27 Oct 2008 12:34:34 +0000 (13:34 +0100)]
add a sample config for olsr_switch using hemu interfaces

11 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Mon, 27 Oct 2008 12:07:18 +0000 (13:07 +0100)]
Automated merge with http://gredler.at/hg/olsrd

11 years agotrivial cleanups removing some global variables in the TAS plugin
Bernd Petrovitsch [Mon, 27 Oct 2008 12:06:31 +0000 (13:06 +0100)]
trivial cleanups removing some global variables in the TAS plugin

11 years agoConvert the pollrate variable internally to an unsigned int with the unit "microseconds"
Bernd Petrovitsch [Mon, 27 Oct 2008 12:05:23 +0000 (13:05 +0100)]
Convert the pollrate variable internally to an unsigned int with the unit "microseconds"

11 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Mon, 27 Oct 2008 12:02:21 +0000 (13:02 +0100)]
Automated merge with http://gredler.at/hg/olsrd

11 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Mon, 27 Oct 2008 11:57:42 +0000 (12:57 +0100)]
Automated merge with http://gredler.at/hg/olsrd

11 years agoAdd bug fixes by andrea <andrea@csp.it>
Bernd Petrovitsch [Mon, 27 Oct 2008 11:57:09 +0000 (12:57 +0100)]
Add bug fixes by andrea <andrea@csp.it>

11 years agoimported patch tas-cleanups
Bernd Petrovitsch [Mon, 27 Oct 2008 11:36:03 +0000 (12:36 +0100)]
imported patch tas-cleanups

11 years agoConvert the pollrate variable internally to an unsigned int with the unit "microseconds"
Bernd Petrovitsch [Mon, 27 Oct 2008 11:33:19 +0000 (12:33 +0100)]
Convert the pollrate variable internally to an unsigned int with the unit "microseconds"

11 years agoimported patch cleanup-parser.c
Bernd Petrovitsch [Sun, 26 Oct 2008 20:27:50 +0000 (21:27 +0100)]
imported patch cleanup-parser.c

11 years agoimported patch factor-out-common-code-in-generate_msg.c
Bernd Petrovitsch [Sun, 26 Oct 2008 20:26:57 +0000 (21:26 +0100)]
imported patch factor-out-common-code-in-generate_msg.c

11 years agokill struct unknown_message
Bernd Petrovitsch [Sun, 26 Oct 2008 20:25:31 +0000 (21:25 +0100)]
kill struct unknown_message

It was only used in one place. So we inline the ~10 line function
in the only caller and remove all unused fields there.
And then we can get rid of the rebuild_packet.c and rebuild_packet.h
file.

11 years agokill unused stuff
Bernd Petrovitsch [Sun, 26 Oct 2008 20:25:30 +0000 (21:25 +0100)]
kill unused stuff

Killed function prototypes of mid_chgestruct() and
hello_chgestruct() because their functions are gone

- olsr_free_mid_packet() has no caller -> remove it.
- struct mid_message has no user -> remove it.
- struct mid_alias has no user -> remove it.
- moved olsr_free_tc_packet() and olsr_build_tc_packet()
  into generate_msg.c as they are only used there so
  that we can make them "static". And we remove the
  "olsr_" prefix.
- reorder functions in process_package.c to allow gcc to
  inline the only once called functions.

11 years agocleanup src/scheduler.c
Bernd Petrovitsch [Sun, 26 Oct 2008 19:08:31 +0000 (20:08 +0100)]
cleanup src/scheduler.c

- remove olsr_ prefix from static functions
  * rename olsr_jitter() to calc_jitter()
  * rename olsr_walk_timers() to walk_timers()
  * rename olsr_get_next_list_entry() to next_list_entry()
- do not check for EAGAIN after select() - it is not needed as
  select() will never return that.
- use better variable name, save a few lines

11 years agocall "remove_olsr_socket(fd, ...)" before "close(fd)"
Bernd Petrovitsch [Sun, 26 Oct 2008 19:03:02 +0000 (20:03 +0100)]
call "remove_olsr_socket(fd, ...)" before "close(fd)"

and cosmetic.

11 years agoRemove a copy of config-file generator code and data
Bernd Petrovitsch [Sun, 26 Oct 2008 18:53:25 +0000 (19:53 +0100)]
Remove a copy of config-file generator code and data

Apart from the code cleanup aspect, we kill ~4KB code.

11 years agoBugfix: make olsrd_write_cnf() and olsrd_write_cnf() dump the same values
Bernd Petrovitsch [Sun, 26 Oct 2008 18:54:17 +0000 (19:54 +0100)]
Bugfix: make olsrd_write_cnf() and olsrd_write_cnf() dump the same values

And cleanup a little bit.

11 years agoFIX: shut down a small compiler warning
Henning Rogge [Fri, 24 Oct 2008 18:15:25 +0000 (20:15 +0200)]
FIX: shut down a small compiler warning

11 years ago newer flex need that everywhere
Bernd Petrovitsch [Fri, 24 Oct 2008 13:14:44 +0000 (15:14 +0200)]
 newer flex need that everywhere

11 years agomake the TIME macros work on 64bit hardware
Bernd Petrovitsch [Thu, 23 Oct 2008 19:14:46 +0000 (21:14 +0200)]
make the TIME macros work on 64bit hardware

11 years agoimported patch scheduler-fixes
Bernd Petrovitsch [Wed, 22 Oct 2008 15:33:03 +0000 (17:33 +0200)]
imported patch scheduler-fixes

11 years agoimported patch use-c99-bool
Bernd Petrovitsch [Wed, 22 Oct 2008 09:32:57 +0000 (11:32 +0200)]
imported patch use-c99-bool

11 years agofixup olsr_ip_prefix_to_string()
Bernd Petrovitsch [Tue, 21 Oct 2008 21:44:14 +0000 (23:44 +0200)]
fixup olsr_ip_prefix_to_string()

olsr_ip_prefix_to_string() now display the prefix-len for IPv4 (and not
the netmask). The input side should accept it everywhere and it is consistent
to IPv6.
And we use the function more extensively.

11 years agoMake the txtinfo plugin work on Wn32
Bernd Petrovitsch [Mon, 20 Oct 2008 21:40:20 +0000 (23:40 +0200)]
Make the txtinfo plugin work on Wn32

11 years ago* remove unnecessary #include
Bernd Petrovitsch [Sat, 18 Oct 2008 22:43:28 +0000 (00:43 +0200)]
* remove unnecessary #include

11 years agoset the correct file descriptor non-blocking
Bernd Petrovitsch [Sat, 18 Oct 2008 22:36:06 +0000 (00:36 +0200)]
set the correct file descriptor non-blocking

11 years agocleanup strange looking MID code
Hannes Gredler [Fri, 17 Oct 2008 16:42:42 +0000 (18:42 +0200)]
cleanup strange looking MID code

11 years agoComplete the update the txtinfo plugin to not use the pollrate callback function
Bernd Petrovitsch [Fri, 17 Oct 2008 01:06:23 +0000 (03:06 +0200)]
Complete the update the txtinfo plugin to not use the pollrate callback function

Nothing more to say.

11 years agoConvert the numbers to a bitmask
Bernd Petrovitsch [Fri, 17 Oct 2008 01:06:15 +0000 (03:06 +0200)]
Convert the numbers to a bitmask

Convert the constants which specify the outpout from
numbers to a bitmask to simplify the selection.

11 years agoCleanup and bugfix the txtinfo plugin
Bernd Petrovitsch [Fri, 17 Oct 2008 01:06:05 +0000 (03:06 +0200)]
Cleanup and bugfix the txtinfo plugin

Contents:
- fix file descriptor leaks if initialization find's an error
- remove ipc_open and ipc_socket_up away. We use -1 in the respective
  file descriptors for "invalid".
- killed unused variables and return types
- killed trivially duplicated code
- localized variable defintions
- added a few "const"
- removed superflous #include's
- Some minor coding style issues.

11 years agoimported patch extend-scheduler
Bernd Petrovitsch [Fri, 17 Oct 2008 00:38:31 +0000 (02:38 +0200)]
imported patch extend-scheduler

11 years agoMisc build fixes
Bernd Petrovitsch [Fri, 17 Oct 2008 00:36:38 +0000 (02:36 +0200)]
Misc build fixes

Namely:
- added a target "show-ignored-warnings"
- added a few warnings (from gcc-4.3.2)
- fixed typos

11 years agoimported patch scheduler-fixes
Bernd Petrovitsch [Thu, 16 Oct 2008 17:46:41 +0000 (19:46 +0200)]
imported patch scheduler-fixes

11 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Thu, 9 Oct 2008 20:34:20 +0000 (22:34 +0200)]
Automated merge with http://gredler.at/hg/olsrd

11 years agoCleanup net_olsr.[ch]
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:08 +0000 (01:35 +0200)]
Cleanup net_olsr.[ch]

While we are at it.

Coding style cleanups:
- create a "typedef" for the ifchg functions
- removed lots of superflous type casts cluttering the source
- use "tmp" as temporary variable name instead of e.g. "tmp_ptf_list"

Code cleanup:
- Use "ip4equal(&ifp->int_addr.sin_addr, &addr->v4)" instead of
  "((struct sockaddr_in *)&ifp->int_addr)->sin_addr.s_addr == addr->v4.s_addr"
  Ditto for IPv6.
- rewrite all occurences of sockaddr4_to_string() with ip4_to_string()
- replaced sockaddr4_to_string() with a function which prints all of the data
  (and not only the IP-address).
- added a sockaddr_to_string() and sockaddr6_to_string() to print the whole data
- move "init_net();" earlier as it doesn't depend on anything else.
- use a "union" for the struct sockaddr/sockaddr_in/sockaddr_in6 handling in
  net_output and rewrite the address copy operations killing several variables.
  And we have now one "olsr_sendto()" call.
- made one-line functions "static INLINE"
- #if 0 ... #endif out unused funtions: net_reserve_bufspace(), net_outbuffer_push_reserved()

BTW the whole chk_if_changed() function in src/unix/ifnet.c needs a real cleanup.

11 years agoReplace the nanosleep() with select()
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:08 +0000 (01:35 +0200)]
Replace the nanosleep() with select()

And now to the more gory stuff. We replace the nanosleep() in
the central loop with a select() (which doesn't has any file
descriptors there yet).

We basically select() and recalculate the timeout until the
time is over. And we make sure that we select() at least once -
even if the timeout is "0" (or < "0").
This is to give the funtions chance to do something even in
high-load situations.
The olsr_scheduler_sleep() function is thus superflous.

11 years agoSimplify scheduler.c
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:08 +0000 (01:35 +0200)]
Simplify scheduler.c

Make scheduler.c easier to read and reduce the code. And kill a
superflous memset() just before initializing the array.

11 years agoCleanup the signal handlers
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:08 +0000 (01:35 +0200)]
Cleanup the signal handlers

Not really belonging to that theme but I stumbled over it and it annoyed me
since ages:
The signal handlers where quite large functions very probably using system-calls
which one better do not use in a signal handler. Read Stevens'  "Programming in
the Unix environment" for more details into signal handlers.
The worse for Win32: Apperentyl Win32 needs two extra variables to let one
thread break out of the select() loop and continue afterwards with the shutdown
in the signal handler.

The simple and clean solution is quite easy: We add a state variable which is
changed in the signal handlers and do the whole action afterwards.

And the usual coding style cleanup.

This has been tested on Linux and Win32.

11 years agoMerge socket_parser.[ch] into scheduler.[ch]
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:07 +0000 (01:35 +0200)]
Merge socket_parser.[ch] into scheduler.[ch]

There is no real and clear border between the two above. And the files
are not that large. So we simply merge them and loose one global
function (which is now "static").

11 years agoCleanup scheduler.[ch]
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:06 +0000 (01:35 +0200)]
Cleanup scheduler.[ch]

This is done by
- making local-only used variables and funtions "static"
- move variable definitions to more inner blocks
- simplify the code by reducing the number of parallel incremented variables. gcc
  is smart enough.

11 years agoMake the socket parser more general
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:06 +0000 (01:35 +0200)]
Make the socket parser more general

The general goal is to get to a flexible central event loop to allow
decoupling of long time actions (e.g. a slow browser over a slow
connection) from the rest.

We extend the central select() loop to get an additional select() for
file descriptors where the data will be handled immediately.
We do this via an additional callback function (as to not disturb the
current ones).
The caller must also specify, if he wants to be called on a possible
read andor write on the "immediate" and/or the "pollrate" callback
function.
While we're at it, we add a "void *" which is passed back to the caller.
So the caller can actually register more than one instance on different
file descriptors and differentiate the instances via that pointer. E.g.
the httpinfo plugin is now able to really accept more than one client
connection at the same time.

11 years agoCleanup parser.[ch]
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:05 +0000 (01:35 +0200)]
Cleanup parser.[ch]

This is done by
- de-obfuscating the code

11 years agoCleanup ipc_frontend
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:05 +0000 (01:35 +0200)]
Cleanup ipc_frontend

This is done by
- making ipc_check_allowed_ip(), ipc_accept() and frontend_msgparser() "static"
  functions as they are only uised locally.
- ditto for "struct ipcmsg" and "struct ipc_net_msg"
- replacing unused return types with "void"
- killing superfluous #include's
- coding style cleanup, adding "local Variables" sections
- convert a pointer - malloc()ed at begin of a function and free()d at the end
  into a normal variable on the stack.
  This saves code to malloc(), chack that and free() it.
- Killing the boolean "ipc_active" variable as we can use the value "-1" in
  "icp_conn" for the same.

11 years agoCleanup socket_parser.[ch]
Bernd Petrovitsch [Mon, 6 Oct 2008 23:35:05 +0000 (01:35 +0200)]
Cleanup socket_parser.[ch]

This is done by
- coding style cleanup, adding "local Variables" sections
- removed the unused "arp_type" field
- creating a "typedef" for the socket handler functions
- calculating the "highest fd+1" for select() with the fdsets. It
  is more like almost allother similar apps and we avoid the ugly
  recalculation on socket removal and reduce the code.
- Retry the select() immediately on EINTR and EAGAIN (which
  shouldn't happen in the first place).

11 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Mon, 6 Oct 2008 21:58:05 +0000 (23:58 +0200)]
Automated merge with http://gredler.at/hg/olsrd

11 years agoBugfix and work on the httpinfo plugin
Bernd Petrovitsch [Mon, 6 Oct 2008 21:54:20 +0000 (23:54 +0200)]
Bugfix and work on the httpinfo plugin

This changesets includes:
- The make ADMIN_INTERFACE variable must be == 1 to be "activated" as specified
  in the docs.
  And the C preprocessor #define is set to 0 or 1. So we can use #if (and not
  #ifdef) to check it. This saves against typos in the variables names.
- Without the admin_interface, the admin_interface.{c,h} files can be
  completely ignored. So we do that. We keep #ifdef's inside of the 2 files
  though.
- trivial cleanups:
  - reduced a few lines and using snprintf()s format strings with the
    snprintf(). Otherwise I regurarly wondered why %% was in the constant
    strings;-)
  - remove superflous #include's, added needed ones
  - save few bytes in the CSS. It is unreadable anyways.
- Removed code for the dead "lq_wsize" option.
- a few layout improvements.

Last but not least and the by far important part as it is a real bugfix:
- Removed the "for (idx = 0; idx < HASHSIZE; idx++) {" loop around the
  "OLSR_FOR_ALL_TC_ENTRIES(tc)" loop.
  Getting a > 11MB (IIRC) HTML file (if one tries it on the FunkFeuer net)
  didn't make FireFox happy. And reading the same 2 lines lots of times on
  a 2 node "net" is not better.
  I think it was forgotten/overseen with the MID-set refactoring.

Actually testet on Linux and Win32.

11 years ago* * *
Bernd Petrovitsch [Mon, 6 Oct 2008 21:45:41 +0000 (23:45 +0200)]
* * *

11 years agoadd make target for arprefresh
Eric Malkowski [Mon, 6 Oct 2008 12:40:29 +0000 (14:40 +0200)]
add make target for arprefresh

11 years ago* grrrmmbl, fixed unwanted changes
Bernd Petrovitsch [Sat, 4 Oct 2008 22:31:32 +0000 (00:31 +0200)]
* grrrmmbl, fixed unwanted changes

11 years ago* added missing __attribute__((unsed))
Bernd Petrovitsch [Sat, 4 Oct 2008 22:28:07 +0000 (00:28 +0200)]
* added missing __attribute__((unsed))
* IMHO olsr_print_hna_set() should have looked like this.

11 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Sat, 4 Oct 2008 19:07:57 +0000 (21:07 +0200)]
Automated merge with http://gredler.at/hg/olsrd

11 years ago[mq]: use-c99-bool
Bernd Petrovitsch [Sat, 4 Oct 2008 18:57:26 +0000 (20:57 +0200)]
[mq]: use-c99-bool

11 years agoimported patch avoid-duplicate-define
Bernd Petrovitsch [Sat, 4 Oct 2008 18:17:11 +0000 (20:17 +0200)]
imported patch avoid-duplicate-define

11 years ago* make it compile without -DUSE_FPM
Bernd Petrovitsch [Sat, 4 Oct 2008 17:27:24 +0000 (19:27 +0200)]
* make it compile without -DUSE_FPM
* untested
Or we want to get rid of the old code?

11 years ago removed superflous -ifndef
Bernd Petrovitsch [Sat, 4 Oct 2008 16:59:04 +0000 (18:59 +0200)]
 removed superflous -ifndef

11 years ago- fix building on x86_64: "long" is 64bit there and according to the
Bernd Petrovitsch [Sat, 4 Oct 2008 16:55:50 +0000 (18:55 +0200)]
- fix building on x86_64: "long" is 64bit there and according to the
  comment, we want 32bit only. So we use "int"

12 years agoAutomated merge with http://gredler.at/hg/olsrd
Bernd Petrovitsch [Mon, 22 Sep 2008 21:30:06 +0000 (23:30 +0200)]
Automated merge with http://gredler.at/hg/olsrd

12 years agorework the HNA input parser
Hannes Gredler [Mon, 22 Sep 2008 21:26:05 +0000 (23:26 +0200)]
rework the HNA input parser

12 years agoremove max_jitter references since its not required after conversion to the new timer API
Hannes Gredler [Mon, 22 Sep 2008 16:30:17 +0000 (18:30 +0200)]
remove max_jitter references since its not required after conversion to the new timer API