mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
slirp: improve send_packet() callback
Use a more descriptive name for the callback. Reuse the SlirpWriteCb type. Wrap it to check that all data has been written. Return a ssize_t for potential error handling and data-loss reporting. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
d7df0b41dc
commit
625a526b32
7 changed files with 33 additions and 15 deletions
|
@ -668,9 +668,9 @@ ssize_t qemu_send_packet_async(NetClientState *sender,
|
|||
buf, size, sent_cb);
|
||||
}
|
||||
|
||||
void qemu_send_packet(NetClientState *nc, const uint8_t *buf, int size)
|
||||
ssize_t qemu_send_packet(NetClientState *nc, const uint8_t *buf, int size)
|
||||
{
|
||||
qemu_send_packet_async(nc, buf, size, NULL);
|
||||
return qemu_send_packet_async(nc, buf, size, NULL);
|
||||
}
|
||||
|
||||
ssize_t qemu_send_packet_raw(NetClientState *nc, const uint8_t *buf, int size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue