mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
io: change the QIOTask callback signature
Currently the QIOTaskFunc signature takes an Object * for the source, and an Error * for any error. We also need to be able to provide a result pointer. Rather than continue to add parameters to QIOTaskFunc, remove the existing ones and simply pass the QIOTask object instead. This has methods to access all the other data items required in the callback impl. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
1a447e4f02
commit
60e705c51c
15 changed files with 110 additions and 112 deletions
|
@ -65,16 +65,17 @@ static void start_auth_vencrypt_subauth(VncState *vs)
|
|||
}
|
||||
}
|
||||
|
||||
static void vnc_tls_handshake_done(Object *source,
|
||||
Error *err,
|
||||
static void vnc_tls_handshake_done(QIOTask *task,
|
||||
gpointer user_data)
|
||||
{
|
||||
VncState *vs = user_data;
|
||||
Error *err = NULL;
|
||||
|
||||
if (err) {
|
||||
if (qio_task_propagate_error(task, &err)) {
|
||||
VNC_DEBUG("Handshake failed %s\n",
|
||||
error_get_pretty(err));
|
||||
vnc_client_error(vs);
|
||||
error_free(err);
|
||||
} else {
|
||||
vs->ioc_tag = qio_channel_add_watch(
|
||||
vs->ioc, G_IO_IN | G_IO_OUT, vnc_client_io, vs, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue