summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2012-07-18 09:41:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-18 14:57:27 +0100
commitb68fb414f9661e4cf7c6c62940d44593aa9146df (patch)
treef108c83e0f195f2b597c97e44740ea63856dba35 /meta/recipes-devtools/binutils
parent617835990edf1d7ca4fc8c08993b1b6725f12290 (diff)
downloadast2050-yocto-poky-b68fb414f9661e4cf7c6c62940d44593aa9146df.zip
ast2050-yocto-poky-b68fb414f9661e4cf7c6c62940d44593aa9146df.tar.gz
watchdog: fix ping mode failure
[YOCTO #2755] When watchdog works on ping mode, the system will be rebooted since watchdog can not receive the expected ECOREPLY on a setting interval. Ping mode uses a raw socket to send a ECO packet, then uses select() to wait and recvfrom() to receive the ECOREPLY packet, if select() shows the data is ready, and the data is not the expected ECOREPLY, and waiting time is not overdue, it will continue use select() and recvfrom(). Problem is that the raw socket can receive any icmp packets, if we do not set filters, and there are many icmp packets on socket, this program will not find its interested ECOREPLY packet in a special interval, which makes the ping mode fail. Other program is that watchdog sometime can not reach the call of recvfrom to try to receive packets since tv_sec of struct timeval of select parameter is 0. The timeout of select() is the result of ping interval minusing the time of calling gettimeofday spending, when ping interval is 1 second, and the call of gettimeofday() spends several useconds, the tv_sec of struct timeval of select parameter must be 0, at that condition, we should think it is valid of tv_sec of struct timeval of select parameter be 0 (From OE-Core rev: 90f3a90413aa1e08c3206b838dcaee0c1c640dc7) Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud