diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-19 08:37:14 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-19 08:37:14 -0600 |
commit | 0f312da354e277b94ff232c4b69f11014d8852ba (patch) | |
tree | d4b8d3956fca388348f75f554b3f55ceb9826b83 /nuttx/net/arp | |
parent | bb0aeaa0faed7e7b2e1bb4def9007dbd237730c9 (diff) | |
download | px4-nuttx-0f312da354e277b94ff232c4b69f11014d8852ba.tar.gz px4-nuttx-0f312da354e277b94ff232c4b69f11014d8852ba.tar.bz2 px4-nuttx-0f312da354e277b94ff232c4b69f11014d8852ba.zip |
ARP: Fix bid conversion from msec to nsec
Diffstat (limited to 'nuttx/net/arp')
-rw-r--r-- | nuttx/net/arp/arp_notify.c | 4 | ||||
-rw-r--r-- | nuttx/net/arp/arp_send.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/net/arp/arp_notify.c b/nuttx/net/arp/arp_notify.c index 97eb9e804..cc3dc6fd2 100644 --- a/nuttx/net/arp/arp_notify.c +++ b/nuttx/net/arp/arp_notify.c @@ -196,6 +196,10 @@ int arp_wait(FAR struct arp_notify_s *notify, FAR struct timespec *timeout) abstime.tv_nsec -= 1000000000; } + /* REVISIT: If sem_timedwait() is awakened with signal, we will return + * the wrong error code. + */ + (void)sem_timedwait(¬ify->nt_sem, &abstime); ret = notify->nt_result; diff --git a/nuttx/net/arp/arp_send.c b/nuttx/net/arp/arp_send.c index a94415c07..b0feb45e9 100644 --- a/nuttx/net/arp/arp_send.c +++ b/nuttx/net/arp/arp_send.c @@ -65,7 +65,7 @@ #define CONFIG_ARP_SEND_DELAYSEC \ (CONFIG_ARP_SEND_DELAYMSEC / 1000) #define CONFIG_ARP_SEND_DELAYNSEC \ - ((CONFIG_ARP_SEND_DELAYMSEC - 1000*CONFIG_ARP_SEND_DELAYSEC) / 1000000) + ((CONFIG_ARP_SEND_DELAYMSEC - 1000*CONFIG_ARP_SEND_DELAYSEC) * 1000000) /**************************************************************************** * Private Types |