diff options
author | Wenchao Xia <wenchaoqemu@gmail.com> | 2014-06-18 08:43:48 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-23 11:12:28 -0400 |
commit | 061502790328ac8d09d39b2b580121dc2ac3f19f (patch) | |
tree | 4c348d827fab7361afcdcd0f4e396389978bf82b /hw/net | |
parent | bcada37b19e79329c47a956c4c2dd5c81727e8c8 (diff) |
qapi event: convert NIC_RX_FILTER_CHANGED
Param name is declared as optional, since in code it is an optional
one.
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/virtio-net.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index d8588f3808..00b5e07ddd 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -22,7 +22,7 @@ #include "net/vhost_net.h" #include "hw/virtio/virtio-bus.h" #include "qapi/qmp/qjson.h" -#include "monitor/monitor.h" +#include "qapi-event.h" #define VIRTIO_NET_VM_VERSION 11 @@ -199,19 +199,12 @@ static void virtio_net_set_link_status(NetClientState *nc) static void rxfilter_notify(NetClientState *nc) { - QObject *event_data; VirtIONet *n = qemu_get_nic_opaque(nc); if (nc->rxfilter_notify_enabled) { gchar *path = object_get_canonical_path(OBJECT(n->qdev)); - if (n->netclient_name) { - event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }", - n->netclient_name, path); - } else { - event_data = qobject_from_jsonf("{ 'path': %s }", path); - } - monitor_protocol_event(QEVENT_NIC_RX_FILTER_CHANGED, event_data); - qobject_decref(event_data); + qapi_event_send_nic_rx_filter_changed(!!n->netclient_name, + n->netclient_name, path, &error_abort); g_free(path); /* disable event notification to avoid events flooding */ |