diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-17 21:00:05 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-17 21:00:05 +0000 |
commit | dcf414d638254dd6201e3adc74b535b060894d53 (patch) | |
tree | 250cd7e642e82a09bdab20c64e6fb21c2d35d92d /vl.c | |
parent | 6c9f886ceae5b998dc2b9af2bf77666941689bce (diff) | |
download | qemu-dcf414d638254dd6201e3adc74b535b060894d53.zip qemu-dcf414d638254dd6201e3adc74b535b060894d53.tar.gz qemu-dcf414d638254dd6201e3adc74b535b060894d53.tar.bz2 |
Remove the NIC from vlan on usb destroy.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4885 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -3870,6 +3870,19 @@ VLANClientState *qemu_new_vlan_client(VLANState *vlan, return vc; } +void qemu_del_vlan_client(VLANClientState *vc) +{ + VLANClientState **pvc = &vc->vlan->first_client; + + while (*pvc != NULL) + if (*pvc == vc) { + *pvc = vc->next; + free(vc); + break; + } else + pvc = &(*pvc)->next; +} + int qemu_can_send_packet(VLANClientState *vc1) { VLANState *vlan = vc1->vlan; |