sys_poll_intr: fix timeout arithmetic
commit5907b0cc1e1ba60ae15b41e04ae4a217ce2815cd
authorDaniel Kobras <d.kobras@science-computing.de>
Mon, 21 Jul 2014 08:47:53 +0000 (21 10:47 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 21 Jul 2014 22:12:24 +0000 (22 00:12 +0200)
treee7015151da891a2c3cac2bc30c0276c0b467da43
parent1dd64341d801d9adc66aa6432dc3afb64644e29b
sys_poll_intr: fix timeout arithmetic

Callers of sys_poll_intr() assume timeout to be in milliseconds like
poll(2) expects, but implementation used nanosecond units. Also make
sure timeout doesn't become infinite by mistake during time arithmetic.

Signed-off-by: Daniel Kobras <d.kobras@science-computing.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 22 00:12:24 CEST 2014 on sn-devel-104
lib/util/select.c