* grub-core/net/net.c (receive_packets): Stop after 100 packets to let

sync part to handle them.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-22 12:42:31 +02:00
parent f35abd8190
commit 6b9cfac683
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/net/net.c (receive_packets): Stop after 100 packets to let
sync part to handle them.
2012-06-21 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/main.c (grub_set_prefix_and_root): Fix memory leak.

View file

@ -1311,6 +1311,7 @@ grub_net_fs_close (grub_file_t file)
static void
receive_packets (struct grub_net_card *card)
{
int received = 0;
if (card->num_ifaces == 0)
return;
if (!card->opened)
@ -1331,12 +1332,16 @@ receive_packets (struct grub_net_card *card)
and just mark them as used and not used. */
struct grub_net_buff *nb;
if (received > 100)
break;
nb = card->driver->recv (card);
if (!nb)
{
card->last_poll = grub_get_time_ms ();
break;
}
received++;
grub_net_recv_ethernet_packet (nb, card);
if (grub_errno)
{