mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-24 16:11:03 +03:00
fixed bug #3526909 (Wrong unit conversion) pointed out by jsucaet
Applied patch provided by jsucaet.
This commit is contained in:
1 parent
28a6d45cde
commit
abf33c87f9
5 files changed
+7
-7
No files matched your search
+1
-1
@@ -394,7 +394,7 @@ main(int argc, char **argv) {
|
||||
|
||||
if ( nextpdu && nextpdu->t <= now + COAP_RESOURCE_CHECK_TIME ) {
|
||||
/* set timeout if there is a pdu to send before our automatic timeout occurs */
|
||||
tv.tv_usec = ((nextpdu->t - now) % COAP_TICKS_PER_SECOND) << 10;
|
||||
tv.tv_usec = ((nextpdu->t - now) % COAP_TICKS_PER_SECOND) * 1000000 / COAP_TICKS_PER_SECOND;
|
||||
tv.tv_sec = (nextpdu->t - now) / COAP_TICKS_PER_SECOND;
|
||||
timeout = &tv;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user