[Spice-devel,spice-gtk,7/7] migration: copy enable-smartcard and enable-audio state to the migrated session

Submitted by Yonit Halperin on Aug. 15, 2012, 7:56 a.m.

Details

Message ID 1345017402-872-67-git-send-email-yhalperi@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Yonit Halperin Aug. 15, 2012, 7:56 a.m.
Otherwise, we will not create smartcard channel on the destination
side, and we will create audio channels, no matter if they existed
of didn't exist for the src side.
---
 gtk/spice-session.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index bfe6b89..47a7ec8 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1089,8 +1089,14 @@  SpiceSession *spice_session_new_from_session(SpiceSession *session)
                  "verify", &c->verify,
                  "smartcard-certificates", &c->smartcard_certificates,
                  "smartcard-db", &c->smartcard_db,
+                 "enable-smartcard", &c->smartcard,
+                 "enable-audio", &c->audio,
                  NULL);
 
+    g_object_set(copy,
+                 "enable-smartcard", c->smartcard,
+                 "enable-audio", c->audio,
+                 NULL);
     c->client_provided_sockets = s->client_provided_sockets;
     c->protocol = s->protocol;
     c->connection_id = s->connection_id;

Comments

On Wed, Aug 15, 2012 at 9:56 AM, Yonit Halperin <yhalperi@redhat.com> wrote:
> +    g_object_set(copy,
> +                 "enable-smartcard", c->smartcard,
> +                 "enable-audio", c->audio,
> +                 NULL);

like the rest of the c->fields above, you don't need to call
g_object_set() again.

ack otherwise
Hi,
On 08/21/2012 02:14 PM, Marc-André Lureau wrote:
> On Wed, Aug 15, 2012 at 9:56 AM, Yonit Halperin<yhalperi@redhat.com>  wrote:
>> +    g_object_set(copy,
>> +                 "enable-smartcard", c->smartcard,
>> +                 "enable-audio", c->audio,
>> +                 NULL);
>
> like the rest of the c->fields above, you don't need to call
> g_object_set() again.
>
(why "again"?)
Ok, so spice_channel_new should be changed to check SpiceSessionPrivate
fields instead of using g_object_get for the corresponding properties.

> ack otherwise
>