mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
Stop polling as soon as we have the packet we were waiting for.
* include/grub/net.h (grub_net_poll_cards): New argument stop_condition. All users updated. * grub-core/net/arp.c (have_pending): New var. (pending_req): Likewise. (grub_net_arp_send_request): Fill pending_req and use have_pending as stop indicator. (grub_net_arp_receive): Set have_pending. * grub-core/net/dns.c (recv_data): New field stop. (recv_hook): Set stop. (grub_net_dns_lookup): Init stop and use as stop condition. * grub-core/net/http.c (http_establish): Use headers_recv as stop condition. * grub-core/net/net.c (grub_net_poll_cards): New argument stop_condition. Stop when it goes true. * grub-core/net/tcp.c (grub_net_tcp_open): Use `established' as stop indicator. * grub-core/net/tftp.c (tftp_open): Use `have_oack' as stop indicator.
This commit is contained in:
1 parent
3e74723951
commit
96f7e60eae
10 files changed
+48
-18
No files matched your search
+1
-1
@@ -458,7 +458,7 @@ void
|
||||
grub_net_hwaddr_to_str (const grub_net_link_level_address_t *addr, char *str);
|
||||
|
||||
void
|
||||
grub_net_poll_cards (unsigned time);
|
||||
grub_net_poll_cards (unsigned time, int *stop_condition);
|
||||
|
||||
void grub_bootp_init (void);
|
||||
void grub_bootp_fini (void);
|
||||
|
||||
Reference in new issue
Block a user