ARP: Fix bid conversion from msec to nsec

This commit is contained in:
Gregory Nutt
2014-08-19 08:37:14 -06:00
parent a9ca05266b
commit 8e84282c05
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -196,6 +196,10 @@ int arp_wait(FAR struct arp_notify_s *notify, FAR struct timespec *timeout)
abstime.tv_nsec -= 1000000000; abstime.tv_nsec -= 1000000000;
} }
/* REVISIT: If sem_timedwait() is awakened with signal, we will return
* the wrong error code.
*/
(void)sem_timedwait(&notify->nt_sem, &abstime); (void)sem_timedwait(&notify->nt_sem, &abstime);
ret = notify->nt_result; ret = notify->nt_result;
+1 -1
View File
@@ -65,7 +65,7 @@
#define CONFIG_ARP_SEND_DELAYSEC \ #define CONFIG_ARP_SEND_DELAYSEC \
(CONFIG_ARP_SEND_DELAYMSEC / 1000) (CONFIG_ARP_SEND_DELAYMSEC / 1000)
#define CONFIG_ARP_SEND_DELAYNSEC \ #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 * Private Types