aboutsummaryrefslogtreecommitdiff
path: root/io/channel-websock.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-08-11 15:20:58 +0100
committerDaniel P. Berrange <berrange@redhat.com>2017-01-23 15:32:18 +0000
commit60e705c51c66373f78e536e0462744a610c27cf6 (patch)
treea92d50a052c105d1554b11ab4c89a90f15a54be0 /io/channel-websock.c
parent1a447e4f0266d757687b38146795b95525d37d94 (diff)
downloadqemu-60e705c51c66373f78e536e0462744a610c27cf6.zip
qemu-60e705c51c66373f78e536e0462744a610c27cf6.tar.gz
qemu-60e705c51c66373f78e536e0462744a610c27cf6.tar.bz2
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>
Diffstat (limited to 'io/channel-websock.c')
-rw-r--r--io/channel-websock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/io/channel-websock.c b/io/channel-websock.c
index f45bced..e47279a 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -279,8 +279,8 @@ static gboolean qio_channel_websock_handshake_send(QIOChannel *ioc,
if (ret < 0) {
trace_qio_channel_websock_handshake_fail(ioc);
- qio_task_abort(task, err);
- error_free(err);
+ qio_task_set_error(task, err);
+ qio_task_complete(task);
return FALSE;
}
@@ -307,8 +307,8 @@ static gboolean qio_channel_websock_handshake_io(QIOChannel *ioc,
ret = qio_channel_websock_handshake_read(wioc, &err);
if (ret < 0) {
trace_qio_channel_websock_handshake_fail(ioc);
- qio_task_abort(task, err);
- error_free(err);
+ qio_task_set_error(task, err);
+ qio_task_complete(task);
return FALSE;
}
if (ret == 0) {