bool qemu_net_queue_flush(NetQueue *queue)

{

    while (!QTAILQ_EMPTY(&queue->packets)) {

        NetPacket *packet;

        int ret;



        packet = QTAILQ_FIRST(&queue->packets);

        QTAILQ_REMOVE(&queue->packets, packet, entry);




        ret = qemu_net_queue_deliver(queue,

                                     packet->sender,

                                     packet->flags,

                                     packet->data,

                                     packet->size);

        if (ret == 0) {

            queue->nq_count++;

            QTAILQ_INSERT_HEAD(&queue->packets, packet, entry);

            return false;

        }



        if (packet->sent_cb) {

            packet->sent_cb(packet->sender, ret);

        }



        g_free(packet);

    }

    return true;

}
bool qemu_net_queue_flush(NetQueue *queue)

{

    while (!QTAILQ_EMPTY(&queue->packets)) {

        NetPacket *packet;

        int ret;



        packet = QTAILQ_FIRST(&queue->packets);

        QTAILQ_REMOVE(&queue->packets, packet, entry);




        ret = qemu_net_queue_deliver(queue,

                                     packet->sender,

                                     packet->flags,

                                     packet->data,

                                     packet->size);

        if (ret == 0) {

            queue->nq_count++;

            QTAILQ_INSERT_HEAD(&queue->packets, packet, entry);

            return false;

        }



        if (packet->sent_cb) {

            packet->sent_cb(packet->sender, ret);

        }



        g_free(packet);

    }

    return true;

}
bool FUNC_0(NetQueue *queue)

{

    while (!QTAILQ_EMPTY(&queue->packets)) {

        NetPacket *packet;

        int VAR_0;



        packet = QTAILQ_FIRST(&queue->packets);

        QTAILQ_REMOVE(&queue->packets, packet, entry);




        VAR_0 = qemu_net_queue_deliver(queue,

                                     packet->sender,

                                     packet->flags,

                                     packet->data,

                                     packet->size);

        if (VAR_0 == 0) {

            queue->nq_count++;

            QTAILQ_INSERT_HEAD(&queue->packets, packet, entry);

            return false;

        }



        if (packet->sent_cb) {

            packet->sent_cb(packet->sender, VAR_0);

        }



        g_free(packet);

    }

    return true;

}
bool FUNC_0(NetQueue *queue)
{ while (!QTAILQ_EMPTY(&queue->packets)) { NetPacket *packet; int VAR_0; packet = QTAILQ_FIRST(&queue->packets); QTAILQ_REMOVE(&queue->packets, packet, entry); VAR_0 = qemu_net_queue_deliver(queue,
packet->sender,
packet->flags,
packet->data,
packet->size); if (VAR_0 == 0) { queue->nq_count++; QTAILQ_INSERT_HEAD(&queue->packets, packet, entry); return false; } if (packet->sent_cb) { packet->sent_cb(packet->sender, VAR_0); } g_free(packet); } return true; }