[Spice-commits] 3 commits - server/reds-private.h server/reds.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue May 17 15:35:06 UTC 2016


 server/reds-private.h |    2 --
 server/reds.c         |    7 +------
 2 files changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 8e1859a102ad32973ea3f008b7f29cbd7909546b
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sun May 15 17:22:32 2016 +0100

    remove only written num_mig_target_clients field in RedsState
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/reds-private.h b/server/reds-private.h
index 97ea0ba..5724f16 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -118,7 +118,6 @@ struct RedsState {
     int dst_do_seamless_migrate; /* per migration. Updated after the migration handshake
                                     between the 2 servers */
     Ring mig_target_clients;
-    int num_mig_target_clients;
 
     int num_of_channels;
     Ring channels;
diff --git a/server/reds.c b/server/reds.c
index 988858d..a1e589a 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1671,7 +1671,6 @@ static void reds_mig_target_client_add(RedsState *reds, RedClient *client)
     mig_client->reds = reds;
     ring_init(&mig_client->pending_links);
     ring_add(&reds->mig_target_clients, &mig_client->link);
-    reds->num_mig_target_clients++;
 
 }
 
@@ -1709,7 +1708,6 @@ static void reds_mig_target_client_free(RedsMigTargetClient *mig_client)
     RingItem *now, *next;
 
     ring_remove(&mig_client->link);
-    mig_client->reds->num_mig_target_clients--;
 
     RING_FOREACH_SAFE(now, next, &mig_client->pending_links) {
         RedsMigPendingLink *mig_link = SPICE_CONTAINEROF(now, RedsMigPendingLink, ring_link);
commit 550a56b585838b6469b6a05e1c0be18d03bc0613
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sun May 15 17:13:47 2016 +0100

    remove only written peer_minor_version field in RedsState
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/reds-private.h b/server/reds-private.h
index 74a251b..97ea0ba 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -140,7 +140,6 @@ struct RedsState {
     pthread_mutex_t stat_lock;
     RedsStatValue roundtrip_stat;
 #endif
-    int peer_minor_version;
     int allow_multiple_clients;
 
     RedsClientMonitorsConfig client_monitors_config;
diff --git a/server/reds.c b/server/reds.c
index 1909e6e..988858d 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2356,7 +2356,6 @@ static void reds_handle_link_error(void *opaque, int err)
 static void reds_handle_read_header_done(void *opaque)
 {
     RedLinkInfo *link = (RedLinkInfo *)opaque;
-    RedsState *reds = link->reds;
     SpiceLinkHeader *header = &link->link_header;
 
     header->major_version = GUINT32_FROM_LE(header->major_version);
@@ -2379,8 +2378,6 @@ static void reds_handle_read_header_done(void *opaque)
         return;
     }
 
-    reds->peer_minor_version = header->minor_version;
-
     if (header->size < sizeof(SpiceLinkMess)) {
         reds_send_link_error(link, SPICE_LINK_ERR_INVALID_DATA);
         spice_warning("bad size %u", header->size);
commit 538080da76ed27dd31071997f07291c12b83d775
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sun May 15 17:13:16 2016 +0100

    use more portable SPICE_OFFSETOF instead of offsetof
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/reds.c b/server/reds.c
index 9898fe5..1909e6e 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -442,7 +442,7 @@ uint64_t *stat_add_counter(RedsState *reds, StatNodeRef parent, const char *name
 
 void stat_remove_counter(RedsState *reds, uint64_t *counter)
 {
-    reds_stat_remove(reds, (SpiceStatNode *)(counter - offsetof(SpiceStatNode, value)));
+    reds_stat_remove(reds, (SpiceStatNode *)(counter - SPICE_OFFSETOF(SpiceStatNode, value)));
 }
 
 void stat_update_value(RedsState *reds, uint32_t value)


More information about the Spice-commits mailing list