[Spice-commits] 2 commits - docs/manual server/char-device.c server/red-stream-device.c server/smartcard.c server/spicevmc.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 8 16:26:17 UTC 2019


 docs/manual/manual.txt     |   10 ++++++++++
 server/char-device.c       |    4 ++++
 server/red-stream-device.c |    7 -------
 server/smartcard.c         |    8 --------
 server/spicevmc.c          |   11 -----------
 5 files changed, 14 insertions(+), 26 deletions(-)

New commits:
commit dedc4184c9c5c72affc0bb874a9c715d85c13114
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Fri May 25 16:02:42 2018 +0200

    char-device: Make send_tokens_to_client() optional
    
    Only RedCharDeviceVDIPortClass implements this vfunc, rather than
    forcing every classes deriving from RedCharDeviceClass to implement it,
    red_char_device_send_tokens_to_client() can deal with it.
    
    Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
    Acked-by: Uri Lublin <uril at redhat.com>

diff --git a/server/char-device.c b/server/char-device.c
index f58402cc..040b9114 100644
--- a/server/char-device.c
+++ b/server/char-device.c
@@ -122,6 +122,10 @@ red_char_device_send_tokens_to_client(RedCharDevice *dev,
 {
    RedCharDeviceClass *klass = RED_CHAR_DEVICE_GET_CLASS(dev);
 
+   if (klass->send_tokens_to_client == NULL) {
+       g_warn_if_reached();
+       return;
+   }
    klass->send_tokens_to_client(dev, client, tokens);
 }
 
diff --git a/server/red-stream-device.c b/server/red-stream-device.c
index 70829fbf..b9e0827a 100644
--- a/server/red-stream-device.c
+++ b/server/red-stream-device.c
@@ -574,12 +574,6 @@ stream_device_send_msg_to_client(RedCharDevice *self, RedPipeItem *msg, RedClien
 }
 
 static void
-stream_device_send_tokens_to_client(RedCharDevice *self, RedClient *client, uint32_t tokens)
-{
-    g_warning("%s: Not implemented!", G_STRFUNC);
-}
-
-static void
 stream_device_remove_client(RedCharDevice *self, RedClient *client)
 {
 }
@@ -795,7 +789,6 @@ stream_device_class_init(StreamDeviceClass *klass)
 
     char_dev_class->read_one_msg_from_device = stream_device_read_msg_from_dev;
     char_dev_class->send_msg_to_client = stream_device_send_msg_to_client;
-    char_dev_class->send_tokens_to_client = stream_device_send_tokens_to_client;
     char_dev_class->remove_client = stream_device_remove_client;
     char_dev_class->port_event = stream_device_port_event;
 }
diff --git a/server/smartcard.c b/server/smartcard.c
index 504d6f03..ff680d8a 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -181,13 +181,6 @@ static void smartcard_send_msg_to_client(RedCharDevice *self,
     red_channel_client_pipe_add_push(rcc, msg);
 }
 
-static void smartcard_send_tokens_to_client(RedCharDevice *self,
-                                            RedClient *client,
-                                            uint32_t tokens)
-{
-    spice_error("not implemented");
-}
-
 static void smartcard_remove_client(RedCharDevice *self, RedClient *client)
 {
     RedCharDeviceSmartcard *dev = RED_CHAR_DEVICE_SMARTCARD(self);
@@ -608,7 +601,6 @@ red_char_device_smartcard_class_init(RedCharDeviceSmartcardClass *klass)
 
     char_dev_class->read_one_msg_from_device = smartcard_read_msg_from_device;
     char_dev_class->send_msg_to_client = smartcard_send_msg_to_client;
-    char_dev_class->send_tokens_to_client = smartcard_send_tokens_to_client;
     char_dev_class->remove_client = smartcard_remove_client;
 }
 
diff --git a/server/spicevmc.c b/server/spicevmc.c
index c03bc400..51550c1a 100644
--- a/server/spicevmc.c
+++ b/server/spicevmc.c
@@ -420,16 +420,6 @@ static void spicevmc_port_send_event(RedChannelClient *rcc, uint8_t event)
     red_channel_client_pipe_add_push(rcc, &item->base);
 }
 
-static void spicevmc_char_dev_send_tokens_to_client(RedCharDevice *self,
-                                                    RedClient *client,
-                                                    uint32_t tokens)
-{
-    RedCharDeviceSpiceVmc *vmc = RED_CHAR_DEVICE_SPICEVMC(self);
-    RedVmcChannel *channel = RED_VMC_CHANNEL(vmc->channel);
-
-    red_channel_warning(RED_CHANNEL(channel), "%s: Not implemented!", G_STRFUNC);
-}
-
 static void spicevmc_char_dev_remove_client(RedCharDevice *self,
                                             RedClient *client)
 {
@@ -905,7 +895,6 @@ red_char_device_spicevmc_class_init(RedCharDeviceSpiceVmcClass *klass)
 
     char_dev_class->read_one_msg_from_device = spicevmc_chardev_read_msg_from_dev;
     char_dev_class->send_msg_to_client = spicevmc_chardev_send_msg_to_client;
-    char_dev_class->send_tokens_to_client = spicevmc_char_dev_send_tokens_to_client;
     char_dev_class->remove_client = spicevmc_char_dev_remove_client;
     char_dev_class->port_event = spicevmc_port_event;
 
commit 046be756fc2eda8876dcc0ff7178193c08d36487
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Wed Feb 6 12:05:01 2019 +0100

    doc: Document G_MESSAGES_DEBUG use
    
    Explain how to get more verbose logs out of spice-server
    
    Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt
index 99f6a5c8..9de3c470 100644
--- a/docs/manual/manual.txt
+++ b/docs/manual/manual.txt
@@ -1203,10 +1203,20 @@ Server side
 
 If the virtual machine was started using QEMU directly, SPICE server logs will be output to
 your console stdout.
+
 When using libvirt, logs are located in `/var/log/libvirt/qemu/` for the qemu
 system instance (`qemu:///system`), and in `~/.cache/libvirt/qemu/log` for the
 qemu session instance (`qemu:///session`).
 
+It's possible to get more verbose output by setting the `G_MESSAGES_DEBUG`
+environment variable to `Spice` or `all` before starting QEMU as described in
+https://developer.gnome.org/glib/stable/glib-running.html[GLib documentation].
+
+When using libvirt, the environment variable needs to be set from the XML
+domain definition as described in
+https://libvirt.org/drvqemu.html#qemucommand[libvirt documentation].
+
+
 Client side
 -----------
 


More information about the Spice-commits mailing list