* grub-core/net/net.c (receive_packets): Stop after 100 packets to let
sync part to handle them.
This commit is contained in:
parent
f35abd8190
commit
6b9cfac683
2 changed files with 10 additions and 0 deletions
|
@ -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>
|
2012-06-21 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/kern/main.c (grub_set_prefix_and_root): Fix memory leak.
|
* grub-core/kern/main.c (grub_set_prefix_and_root): Fix memory leak.
|
||||||
|
|
|
@ -1311,6 +1311,7 @@ grub_net_fs_close (grub_file_t file)
|
||||||
static void
|
static void
|
||||||
receive_packets (struct grub_net_card *card)
|
receive_packets (struct grub_net_card *card)
|
||||||
{
|
{
|
||||||
|
int received = 0;
|
||||||
if (card->num_ifaces == 0)
|
if (card->num_ifaces == 0)
|
||||||
return;
|
return;
|
||||||
if (!card->opened)
|
if (!card->opened)
|
||||||
|
@ -1331,12 +1332,16 @@ receive_packets (struct grub_net_card *card)
|
||||||
and just mark them as used and not used. */
|
and just mark them as used and not used. */
|
||||||
struct grub_net_buff *nb;
|
struct grub_net_buff *nb;
|
||||||
|
|
||||||
|
if (received > 100)
|
||||||
|
break;
|
||||||
|
|
||||||
nb = card->driver->recv (card);
|
nb = card->driver->recv (card);
|
||||||
if (!nb)
|
if (!nb)
|
||||||
{
|
{
|
||||||
card->last_poll = grub_get_time_ms ();
|
card->last_poll = grub_get_time_ms ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
received++;
|
||||||
grub_net_recv_ethernet_packet (nb, card);
|
grub_net_recv_ethernet_packet (nb, card);
|
||||||
if (grub_errno)
|
if (grub_errno)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue