Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-grub2
Commits
4537b296
Commit
4537b296
authored
Oct 13, 2016
by
Mike Hibler
Browse files
Change initial connection timeouts again. Be more like BSD libstand version.
parent
819e056e
Changes
1
Hide whitespace changes
Inline
Side-by-side
grub-core/net/tftp.c
View file @
4537b296
...
...
@@ -37,7 +37,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
* XXX allow longer for initial connection since it might require spawning
* a server instance.
*/
#define TFTP_INITIAL_TIMO 2000
#define TFTP_MIN_TIMO 2000
#define TFTP_MAX_TIMO 20000
/* IP port for the MTFTP server used for Intel's PXE */
enum
...
...
@@ -408,7 +409,7 @@ tftp_open (struct grub_file *file, const char *filename)
/* Receive OACK packet. */
nbd
=
nb
.
data
;
for
(
i
=
0
;
i
<
GRUB_NET_TRIES
;
i
++
)
for
(
i
=
TFTP_MIN_TIMO
;
i
<
TFTP_MAX_TIMO
;
i
*=
2
)
{
nb
.
data
=
nbd
;
err
=
grub_net_send_udp_packet
(
data
->
sock
,
&
nb
);
...
...
@@ -419,8 +420,7 @@ tftp_open (struct grub_file *file, const char *filename)
grub_free
(
data
);
return
err
;
}
grub_net_poll_cards
(
TFTP_INITIAL_TIMO
+
(
i
*
GRUB_NET_INTERVAL_ADDITION
),
&
data
->
have_oack
);
grub_net_poll_cards
(
i
,
&
data
->
have_oack
);
if
(
data
->
have_oack
)
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment