channel: Remove unused 3rd red_channel_register_client_cbs() arg

It was probably meant to be used as a "user_data" argument for the
various callbacks, but turns out not to be used.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Christophe Fergeau 2017-02-14 15:17:26 +01:00 committed by Frediano Ziglio
parent 0083207b25
commit 47ca1f0da0
11 changed files with 13 additions and 17 deletions

View File

@ -552,7 +552,7 @@ inputs_channel_constructed(GObject *object)
client_cbs.connect = inputs_connect;
client_cbs.migrate = inputs_migrate;
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, NULL);
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs);
red_channel_set_cap(RED_CHANNEL(self), SPICE_INPUTS_CAP_KEY_SCANCODE);
reds_register_channel(reds, RED_CHANNEL(self));

View File

@ -272,7 +272,7 @@ main_channel_constructed(GObject *object)
red_channel_set_cap(RED_CHANNEL(self), SPICE_MAIN_CAP_SEAMLESS_MIGRATE);
client_cbs.migrate = main_channel_client_migrate;
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, NULL);
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs);
}
static void

View File

@ -91,8 +91,6 @@ struct RedChannelPrivate
RedChannelCapabilities local_caps;
uint32_t migration_flags;
void *data;
ClientCbs client_cbs;
// TODO: when different channel_clients are in different threads
// from Channel -> need to protect!
@ -364,8 +362,7 @@ const RedStatNode *red_channel_get_stat_node(RedChannel *channel)
return &channel->priv->stat;
}
void red_channel_register_client_cbs(RedChannel *channel, const ClientCbs *client_cbs,
gpointer cbs_data)
void red_channel_register_client_cbs(RedChannel *channel, const ClientCbs *client_cbs)
{
spice_assert(client_cbs->connect || channel->priv->type == SPICE_CHANNEL_MAIN);
channel->priv->client_cbs.connect = client_cbs->connect;
@ -377,7 +374,6 @@ void red_channel_register_client_cbs(RedChannel *channel, const ClientCbs *clien
if (client_cbs->migrate) {
channel->priv->client_cbs.migrate = client_cbs->migrate;
}
channel->priv->data = cbs_data;
}
static void add_capability(uint32_t **caps, int *num_caps, uint32_t cap)

View File

@ -122,7 +122,7 @@ void red_channel_remove_client(RedChannel *channel, RedChannelClient *rcc);
void red_channel_init_stat_node(RedChannel *channel, const RedStatNode *parent, const char *name);
void red_channel_register_client_cbs(RedChannel *channel, const ClientCbs *client_cbs, gpointer cbs_data);
void red_channel_register_client_cbs(RedChannel *channel, const ClientCbs *client_cbs);
// caps are freed when the channel is destroyed
void red_channel_set_common_cap(RedChannel *channel, uint32_t cap);
void red_channel_set_cap(RedChannel *channel, uint32_t cap);

View File

@ -595,7 +595,7 @@ stream_device_create_channel(StreamDevice *dev)
ClientCbs client_cbs = { NULL, };
client_cbs.connect = (channel_client_connect_proc) cursor_channel_connect;
client_cbs.migrate = cursor_channel_client_migrate;
red_channel_register_client_cbs(RED_CHANNEL(cursor_channel), &client_cbs, NULL);
red_channel_register_client_cbs(RED_CHANNEL(cursor_channel), &client_cbs);
reds_register_channel(reds, RED_CHANNEL(cursor_channel));
dev->stream_channel = stream_channel;

View File

@ -1337,7 +1337,7 @@ RedWorker* red_worker_new(QXLInstance *qxl,
&worker->core);
channel = RED_CHANNEL(worker->cursor_channel);
red_channel_init_stat_node(channel, &worker->stat, "cursor_channel");
red_channel_register_client_cbs(channel, client_cursor_cbs, dispatcher);
red_channel_register_client_cbs(channel, client_cursor_cbs);
g_object_set_data(G_OBJECT(channel), "dispatcher", dispatcher);
reds_register_channel(reds, channel);
@ -1348,7 +1348,7 @@ RedWorker* red_worker_new(QXLInstance *qxl,
init_info.n_surfaces);
channel = RED_CHANNEL(worker->display_channel);
red_channel_init_stat_node(channel, &worker->stat, "display_channel");
red_channel_register_client_cbs(channel, client_display_cbs, dispatcher);
red_channel_register_client_cbs(channel, client_display_cbs);
g_object_set_data(G_OBJECT(channel), "dispatcher", dispatcher);
reds_register_channel(reds, channel);

View File

@ -544,7 +544,7 @@ red_smartcard_channel_constructed(GObject *object)
G_OBJECT_CLASS(red_smartcard_channel_parent_class)->constructed(object);
client_cbs.connect = smartcard_connect_client;
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, NULL);
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs);
reds_register_channel(reds, RED_CHANNEL(self));
}

View File

@ -1331,7 +1331,7 @@ playback_channel_constructed(GObject *object)
client_cbs.connect = snd_set_playback_peer;
client_cbs.migrate = snd_migrate_channel_client;
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, NULL);
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs);
if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_CELT_0_5_1, SND_CODEC_ANY_FREQUENCY)) {
red_channel_set_cap(RED_CHANNEL(self), SPICE_PLAYBACK_CAP_CELT_0_5_1);
@ -1381,7 +1381,7 @@ record_channel_constructed(GObject *object)
client_cbs.connect = snd_set_record_peer;
client_cbs.migrate = snd_migrate_channel_client;
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, NULL);
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs);
if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_CELT_0_5_1, SND_CODEC_ANY_FREQUENCY)) {
red_channel_set_cap(RED_CHANNEL(self), SPICE_RECORD_CAP_CELT_0_5_1);

View File

@ -191,7 +191,7 @@ red_vmc_channel_constructed(GObject *object)
G_OBJECT_CLASS(red_vmc_channel_parent_class)->constructed(object);
client_cbs.connect = spicevmc_connect;
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, NULL);
red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs);
red_channel_init_stat_node(RED_CHANNEL(self), NULL, "spicevmc");
const RedStatNode *stat = red_channel_get_stat_node(RED_CHANNEL(self));

View File

@ -445,7 +445,7 @@ stream_channel_constructed(GObject *object)
G_OBJECT_CLASS(stream_channel_parent_class)->constructed(object);
client_cbs.connect = stream_channel_connect;
red_channel_register_client_cbs(red_channel, &client_cbs, NULL);
red_channel_register_client_cbs(red_channel, &client_cbs);
red_channel_set_cap(red_channel, SPICE_DISPLAY_CAP_MONITORS_CONFIG);
red_channel_set_cap(red_channel, SPICE_DISPLAY_CAP_STREAM_REPORT);

View File

@ -111,7 +111,7 @@ red_test_channel_constructed(GObject *object)
G_OBJECT_CLASS(red_test_channel_parent_class)->constructed(object);
ClientCbs client_cbs = { .connect = test_connect_client, };
red_channel_register_client_cbs(RED_CHANNEL(object), &client_cbs, NULL);
red_channel_register_client_cbs(RED_CHANNEL(object), &client_cbs);
}
static void