X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test.c;h=2a273de70463dbe4f39117cc50ed438dc46c4834;hb=a7d31e61566f0d2e6cb0821fcdaf74ccfc1f8f64;hp=e04e17bec2e6e7cfb5154bc59aaa9e4fcb4142f6;hpb=dd5fc9da2dac87d83efeb28e2bc35002ef1c51c5;p=utcp diff --git a/test.c b/test.c index e04e17b..2a273de 100644 --- a/test.c +++ b/test.c @@ -159,7 +159,7 @@ static void set_mtu(struct utcp *u, int s) { debug("Using MTU %lu\n", mtu); - utcp_set_mtu(u, mtu ? mtu - 48 : 1300); + utcp_set_mtu(u, mtu ? mtu - 28 : 1300); } int main(int argc, char *argv[]) { @@ -291,7 +291,7 @@ int main(int argc, char *argv[]) { char buf[102400]; - struct timeval timeout = utcp_timeout(u); + struct timespec timeout = utcp_timeout(u); while(!connected || utcp_is_active(u)) { size_t max = c ? utcp_get_sndbuf_free(c) : 0; @@ -304,7 +304,7 @@ int main(int argc, char *argv[]) { max = read_size; } - int timeout_ms = timeout.tv_sec * 1000 + timeout.tv_usec / 1000 + 1; + int timeout_ms = timeout.tv_sec * 1000 + timeout.tv_nsec / 1000000 + 1; debug("polling, dir = %d, timeout = %d\n", dir, timeout_ms);