Re: [Spice-devel] [Spice-commits] src/channel-main.c

2020-03-19 Thread Frediano Ziglio
> 
> Hi
> 
> On Thu, Mar 19, 2020 at 6:05 PM GitLab Mirror
>  wrote:
> >
> >  src/channel-main.c |   36 +++-
> >  1 file changed, 19 insertions(+), 17 deletions(-)
> >
> > New commits:
> > commit 1defa5c0f0107b8496b7696408aad064c65947a5
> > Author: Frediano Ziglio 
> > Date:   Tue Mar 17 21:27:19 2020 +
> >
> > channel-main: Fix indentation
> >
> > Signed-off-by: Frediano Ziglio 
> > Acked-by: Victor Toso 
> >
> > diff --git a/src/channel-main.c b/src/channel-main.c
> > index 1e85a36..0a0b9ca 100644
> > --- a/src/channel-main.c
> > +++ b/src/channel-main.c
> > @@ -283,13 +283,13 @@ static void spice_main_get_property(GObject
> > *object,
> >  switch (prop_id) {
> >  case PROP_MOUSE_MODE:
> >  g_value_set_int(value, c->mouse_mode);
> > -   break;
> > +break;
> >  case PROP_AGENT_CONNECTED:
> >  g_value_set_boolean(value, c->agent_connected);
> > -   break;
> > +break;
> >  case PROP_AGENT_CAPS_0:
> >  g_value_set_int(value, c->agent_caps[0]);
> > -   break;
> > +break;
> 
> Hmm, this looks weird:
> 
> https://gitlab.freedesktop.org/spice/spice-gtk/-/blob/master/src/channel-main.c#L283
>

Indeed, thanks

https://gitlab.freedesktop.org/spice/spice-gtk/-/merge_requests/38

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [Spice-commits] src/channel-main.c

2020-03-19 Thread Marc-André Lureau
Hi

On Thu, Mar 19, 2020 at 6:05 PM GitLab Mirror
 wrote:
>
>  src/channel-main.c |   36 +++-
>  1 file changed, 19 insertions(+), 17 deletions(-)
>
> New commits:
> commit 1defa5c0f0107b8496b7696408aad064c65947a5
> Author: Frediano Ziglio 
> Date:   Tue Mar 17 21:27:19 2020 +
>
> channel-main: Fix indentation
>
> Signed-off-by: Frediano Ziglio 
> Acked-by: Victor Toso 
>
> diff --git a/src/channel-main.c b/src/channel-main.c
> index 1e85a36..0a0b9ca 100644
> --- a/src/channel-main.c
> +++ b/src/channel-main.c
> @@ -283,13 +283,13 @@ static void spice_main_get_property(GObject*object,
>  switch (prop_id) {
>  case PROP_MOUSE_MODE:
>  g_value_set_int(value, c->mouse_mode);
> -   break;
> +break;
>  case PROP_AGENT_CONNECTED:
>  g_value_set_boolean(value, c->agent_connected);
> -   break;
> +break;
>  case PROP_AGENT_CAPS_0:
>  g_value_set_int(value, c->agent_caps[0]);
> -   break;
> +break;

Hmm, this looks weird:

https://gitlab.freedesktop.org/spice/spice-gtk/-/blob/master/src/channel-main.c#L283

>  case PROP_DISPLAY_DISABLE_WALLPAPER:
>  g_value_set_boolean(value, c->display_disable_wallpaper);
>  break;
> @@ -312,8 +312,8 @@ static void spice_main_get_property(GObject*object,
>  g_value_set_int(value, spice_main_get_max_clipboard(self));
>  break;
>  default:
> -   G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
> -   break;
> +G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
> +break;
>  }
>  }
>
> @@ -346,8 +346,8 @@ static void spice_main_set_property(GObject *gobject, 
> guint prop_id,
>  spice_main_set_max_clipboard(self, g_value_get_int(value));
>  break;
>  default:
> -   G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
> -   break;
> +G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
> +break;
>  }
>  }
>
> @@ -2051,9 +2051,10 @@ static void main_agent_handle_msg(SpiceChannel 
> *channel,
>  g_coroutine_signal_emit(self, 
> signals[SPICE_MAIN_CLIPBOARD_SELECTION], 0, selection,
>  cb->type, cb->data, msg->size - 
> sizeof(VDAgentClipboard));
>
> -   if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD)
> -   g_coroutine_signal_emit(self, signals[SPICE_MAIN_CLIPBOARD], 0,
> -  cb->type, cb->data, msg->size - 
> sizeof(VDAgentClipboard));
> +if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD) {
> +g_coroutine_signal_emit(self, signals[SPICE_MAIN_CLIPBOARD], 0,
> +cb->type, cb->data, msg->size - 
> sizeof(VDAgentClipboard));
> +}
>  break;
>  }
>  case VD_AGENT_CLIPBOARD_GRAB:
> @@ -2075,10 +2076,11 @@ static void main_agent_handle_msg(SpiceChannel 
> *channel,
>  }
>
>  g_coroutine_signal_emit(self, 
> signals[SPICE_MAIN_CLIPBOARD_SELECTION_GRAB], 0, selection,
> -  (guint8*)payload, msg->size / sizeof(uint32_t), 
> );
> -if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD)
> +(guint8*)payload, msg->size / 
> sizeof(uint32_t), );
> +if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD) {
>  g_coroutine_signal_emit(self, 
> signals[SPICE_MAIN_CLIPBOARD_GRAB], 0,
> -  payload, msg->size / sizeof(uint32_t), );
> +payload, msg->size / sizeof(uint32_t), 
> );
> +}
>  break;
>  }
>  case VD_AGENT_CLIPBOARD_REQUEST:
> @@ -2086,11 +2088,11 @@ static void main_agent_handle_msg(SpiceChannel 
> *channel,
>  gboolean ret;
>  VDAgentClipboardRequest *req = payload;
>  g_coroutine_signal_emit(self, 
> signals[SPICE_MAIN_CLIPBOARD_SELECTION_REQUEST], 0, selection,
> -  req->type, );
> +req->type, );
>
>  if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD)
>  g_coroutine_signal_emit(self, 
> signals[SPICE_MAIN_CLIPBOARD_REQUEST], 0,
> -  req->type, );
> +req->type, );
>  break;
>  }
>  case VD_AGENT_CLIPBOARD_RELEASE:
> @@ -2333,7 +2335,7 @@ static gboolean migrate_connect(gpointer data)
>  host = (char*)info->host_data;
>
>  if (info->cert_subject_size == 0 ||
> -   strlen((const char*)info->cert_subject_data) == 0) {
> +strlen((const char*)info->cert_subject_data) == 0) {
>  /* only verify hostname if no cert subject */
>  g_object_set(mig->session, "verify", SPICE_SESSION_VERIFY_HOSTNAME, 
> NULL);
>  } else {
> @@ -2690,7 +2692,7 @@ void spice_main_update_display(SpiceMainChannel 
> *channel, int id,
>   * Since: 0.35
>   **/
>  void 

Re: [Spice-devel] How to monitor the Status of SPICE Connection

2020-03-19 Thread Victor Toso
On Thu, Mar 19, 2020 at 09:52:02AM +0800, 丁志坚 wrote:
> Hi, Spice Develop Team. I am a student of UESTC from China.
> 
> As titled, in my project, I want to develop a client program in
> the VM to monitor the spice connectin status and inform to
> background timely.

Which kind information do you want from the connection?

> 
> Any hints or ideas?
> 
> With my best regards.
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


signature.asc
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel