[Spice-commits] server/red-channel-client-private.h server/red-channel-client.c server/red-channel-client.h
Frediano Ziglio
fziglio at kemper.freedesktop.org
Fri Oct 14 14:03:27 UTC 2016
server/red-channel-client-private.h | 12 ++++++++++++
server/red-channel-client.c | 10 +++++-----
server/red-channel-client.h | 11 -----------
3 files changed, 17 insertions(+), 16 deletions(-)
New commits:
commit 40545d0403fecb45837743e3390813c9715adb6a
Author: Pavel Grunt <pgrunt at redhat.com>
Date: Fri Oct 14 13:12:24 2016 +0200
rcc: Make OutgoingHandler private
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/red-channel-client-private.h b/server/red-channel-client-private.h
index f94e042..83fef23 100644
--- a/server/red-channel-client-private.h
+++ b/server/red-channel-client-private.h
@@ -21,6 +21,16 @@
#include "red-channel.h"
#include "red-channel-client.h"
+typedef struct OutgoingHandler {
+ OutgoingHandlerInterface *cb;
+ void *opaque;
+ struct iovec vec_buf[IOV_MAX];
+ int vec_size;
+ struct iovec *vec;
+ int pos;
+ int size;
+} OutgoingHandler;
+
struct RedChannelClientPrivate
{
RedChannel *channel;
@@ -70,6 +80,8 @@ struct RedChannelClientPrivate
RedChannelClientLatencyMonitor latency_monitor;
RedChannelClientConnectivityMonitor connectivity_monitor;
+
+ OutgoingHandler outgoing;
};
#endif /* _H_RED_CHANNEL_CLIENT_PRIVATE */
diff --git a/server/red-channel-client.c b/server/red-channel-client.c
index e860390..36d9c33 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -874,10 +874,10 @@ static gboolean red_channel_client_initable_init(GInitable *initable,
self->incoming.cb = &self->priv->channel->incoming_cb;
self->incoming.header.data = self->incoming.header_buf;
- self->outgoing.opaque = self;
- self->outgoing.cb = &self->priv->channel->outgoing_cb;
- self->outgoing.pos = 0;
- self->outgoing.size = 0;
+ self->priv->outgoing.opaque = self;
+ self->priv->outgoing.cb = &self->priv->channel->outgoing_cb;
+ self->priv->outgoing.pos = 0;
+ self->priv->outgoing.size = 0;
g_queue_init(&self->priv->pipe);
if (self->priv->stream)
@@ -1189,7 +1189,7 @@ void red_channel_client_receive(RedChannelClient *rcc)
void red_channel_client_send(RedChannelClient *rcc)
{
g_object_ref(rcc);
- red_peer_handle_outgoing(rcc->priv->stream, &rcc->outgoing);
+ red_peer_handle_outgoing(rcc->priv->stream, &rcc->priv->outgoing);
g_object_unref(rcc);
}
diff --git a/server/red-channel-client.h b/server/red-channel-client.h
index 3b9e34c..9cc5245 100644
--- a/server/red-channel-client.h
+++ b/server/red-channel-client.h
@@ -191,16 +191,6 @@ gboolean red_channel_client_set_migration_seamless(RedChannelClient *rcc);
void red_channel_client_set_destroying(RedChannelClient *rcc);
gboolean red_channel_client_is_destroying(RedChannelClient *rcc);
-typedef struct OutgoingHandler {
- OutgoingHandlerInterface *cb;
- void *opaque;
- struct iovec vec_buf[IOV_MAX];
- int vec_size;
- struct iovec *vec;
- int pos;
- int size;
-} OutgoingHandler;
-
typedef struct IncomingHandler {
IncomingHandlerInterface *cb;
void *opaque;
@@ -216,7 +206,6 @@ struct RedChannelClient
GObject parent;
/* protected */
- OutgoingHandler outgoing;
IncomingHandler incoming;
RedChannelClientPrivate *priv;
More information about the Spice-commits
mailing list