summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/exec/libnetworking/lib/tftpDriver.c5
-rw-r--r--c/src/libnetworking/lib/tftpDriver.c5
-rw-r--r--cpukit/libnetworking/lib/tftpDriver.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/c/src/exec/libnetworking/lib/tftpDriver.c b/c/src/exec/libnetworking/lib/tftpDriver.c
index 369a23be67..ea3de5a901 100644
--- a/c/src/exec/libnetworking/lib/tftpDriver.c
+++ b/c/src/exec/libnetworking/lib/tftpDriver.c
@@ -305,8 +305,8 @@ getPacket (struct tftpStream *tp)
int len;
struct timeval tv;
- tv.tv_sec = 6;
- tv.tv_usec = 0;
+ tv.tv_sec = PACKET_REPLY_MILLISECONDS / 1000;
+ tv.tv_usec = (PACKET_REPLY_MILLISECONDS % 1000) * 1000;
setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
for (;;) {
union {
@@ -335,6 +335,7 @@ getPacket (struct tftpStream *tp)
sendStifle (tp, &from.i);
}
tv.tv_sec = 0;
+ tv.tv_usec = 0;
setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
return len;
}
diff --git a/c/src/libnetworking/lib/tftpDriver.c b/c/src/libnetworking/lib/tftpDriver.c
index 369a23be67..ea3de5a901 100644
--- a/c/src/libnetworking/lib/tftpDriver.c
+++ b/c/src/libnetworking/lib/tftpDriver.c
@@ -305,8 +305,8 @@ getPacket (struct tftpStream *tp)
int len;
struct timeval tv;
- tv.tv_sec = 6;
- tv.tv_usec = 0;
+ tv.tv_sec = PACKET_REPLY_MILLISECONDS / 1000;
+ tv.tv_usec = (PACKET_REPLY_MILLISECONDS % 1000) * 1000;
setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
for (;;) {
union {
@@ -335,6 +335,7 @@ getPacket (struct tftpStream *tp)
sendStifle (tp, &from.i);
}
tv.tv_sec = 0;
+ tv.tv_usec = 0;
setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
return len;
}
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
index 369a23be67..ea3de5a901 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/libnetworking/lib/tftpDriver.c
@@ -305,8 +305,8 @@ getPacket (struct tftpStream *tp)
int len;
struct timeval tv;
- tv.tv_sec = 6;
- tv.tv_usec = 0;
+ tv.tv_sec = PACKET_REPLY_MILLISECONDS / 1000;
+ tv.tv_usec = (PACKET_REPLY_MILLISECONDS % 1000) * 1000;
setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
for (;;) {
union {
@@ -335,6 +335,7 @@ getPacket (struct tftpStream *tp)
sendStifle (tp, &from.i);
}
tv.tv_sec = 0;
+ tv.tv_usec = 0;
setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
return len;
}