[Olsr-dev] nameservice plugin timeout is ignored

Henning Rogge (spam-protected)
Tue Jul 24 11:38:17 CEST 2012


On 07/24/2012 11:33 AM, Lars Kruse wrote:
> Hi,
>
> as reported in http://olsr.org/bugs/view.php?id=33 I noticed that the timeout
> parameter of the namespace plugin is _almost_ ignored.
> The simple cause is a type mismatch (double/float).

diff --git a/lib/nameservice/src/nameservice.c 
b/lib/nameservice/src/nameservice.c
index 53ad64b..55852cd 100644
--- a/lib/nameservice/src/nameservice.c
+++ b/lib/nameservice/src/nameservice.c
@@ -77,7 +77,7 @@ static char my_sighup_pid_file[MAX_FILE + 1];
  static char my_add_hosts[MAX_FILE + 1];
  static char my_suffix[MAX_SUFFIX];
  static int my_interval = EMISSION_INTERVAL;
-static double my_timeout = NAME_VALID_TIME;
+static float my_timeout = NAME_VALID_TIME;
  static char my_resolv_file[MAX_FILE + 1];
  static char my_services_file[MAX_FILE + 1];
  static char my_macs_file[MAX_FILE + 1];


> Attached you find the trivial patch that solves the problem for me.

Yes, that is a bug, set_nameservice_float() writes a float, not a double.

Acked-by: (spam-protected)

Henning

-- 
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120724/ff977137/attachment.bin>


More information about the Olsr-dev mailing list