aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/colo-compare.c10
-rw-r--r--net/filter-mirror.c8
-rw-r--r--net/slirp.c2
-rw-r--r--net/vhost-user.c7
4 files changed, 11 insertions, 16 deletions
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 2639c7f0a2..6d500e1dc4 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -25,7 +25,7 @@
#include "qom/object.h"
#include "qemu/typedefs.h"
#include "net/queue.h"
-#include "sysemu/char.h"
+#include "chardev/char-fe.h"
#include "qemu/sockets.h"
#include "qapi-visit.h"
#include "net/colo.h"
@@ -801,11 +801,9 @@ static void colo_compare_finalize(Object *obj)
{
CompareState *s = COLO_COMPARE(obj);
- qemu_chr_fe_set_handlers(&s->chr_pri_in, NULL, NULL, NULL, NULL,
- s->worker_context, true);
- qemu_chr_fe_set_handlers(&s->chr_sec_in, NULL, NULL, NULL, NULL,
- s->worker_context, true);
- qemu_chr_fe_deinit(&s->chr_out);
+ qemu_chr_fe_deinit(&s->chr_pri_in, false);
+ qemu_chr_fe_deinit(&s->chr_sec_in, false);
+ qemu_chr_fe_deinit(&s->chr_out, false);
g_main_loop_quit(s->compare_loop);
qemu_thread_join(&s->thread);
diff --git a/net/filter-mirror.c b/net/filter-mirror.c
index 8b1b06977d..52d978fce2 100644
--- a/net/filter-mirror.c
+++ b/net/filter-mirror.c
@@ -20,7 +20,7 @@
#include "qemu/main-loop.h"
#include "qemu/error-report.h"
#include "trace.h"
-#include "sysemu/char.h"
+#include "chardev/char-fe.h"
#include "qemu/iov.h"
#include "qemu/sockets.h"
@@ -178,15 +178,15 @@ static void filter_mirror_cleanup(NetFilterState *nf)
{
MirrorState *s = FILTER_MIRROR(nf);
- qemu_chr_fe_deinit(&s->chr_out);
+ qemu_chr_fe_deinit(&s->chr_out, false);
}
static void filter_redirector_cleanup(NetFilterState *nf)
{
MirrorState *s = FILTER_REDIRECTOR(nf);
- qemu_chr_fe_deinit(&s->chr_in);
- qemu_chr_fe_deinit(&s->chr_out);
+ qemu_chr_fe_deinit(&s->chr_in, false);
+ qemu_chr_fe_deinit(&s->chr_out, false);
}
static void filter_mirror_setup(NetFilterState *nf, Error **errp)
diff --git a/net/slirp.c b/net/slirp.c
index c705a60b62..6a6d727999 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -37,7 +37,7 @@
#include "qemu/sockets.h"
#include "slirp/libslirp.h"
#include "slirp/ip6.h"
-#include "sysemu/char.h"
+#include "chardev/char-fe.h"
#include "sysemu/sysemu.h"
#include "qemu/cutils.h"
#include "qapi/error.h"
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 00a0c1cbc5..a042ec6a34 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -12,7 +12,7 @@
#include "clients.h"
#include "net/vhost_net.h"
#include "net/vhost-user.h"
-#include "sysemu/char.h"
+#include "chardev/char-fe.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "qmp-commands.h"
@@ -151,10 +151,7 @@ static void vhost_user_cleanup(NetClientState *nc)
s->vhost_net = NULL;
}
if (nc->queue_index == 0) {
- Chardev *chr = qemu_chr_fe_get_driver(&s->chr);
-
- qemu_chr_fe_deinit(&s->chr);
- object_unparent(OBJECT(chr));
+ qemu_chr_fe_deinit(&s->chr, true);
}
qemu_purge_queued_packets(nc);