summaryrefslogtreecommitdiffstats
path: root/vdagentd.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-10-27 16:20:56 +0200
committerHans de Goede <hdegoede@redhat.com>2010-10-27 16:33:46 +0200
commit530761b2391963c5319ec429391288d3cf77456c (patch)
tree0f16b7414a11b6327302efcd55eadb57eed3f77f /vdagentd.c
parent947694e4cf562090cf0f8910a31cb394f032e3f8 (diff)
downloadvd_agent-530761b2391963c5319ec429391288d3cf77456c.tar.gz
vd_agent-530761b2391963c5319ec429391288d3cf77456c.tar.xz
vd_agent-530761b2391963c5319ec429391288d3cf77456c.zip
udscs: sync up callback disconnect handling
Diffstat (limited to 'vdagentd.c')
-rw-r--r--vdagentd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/vdagentd.c b/vdagentd.c
index 05b4882..ef85051 100644
--- a/vdagentd.c
+++ b/vdagentd.c
@@ -305,7 +305,7 @@ void client_disconnect(struct udscs_connection *conn)
}
}
-int client_read_complete(struct udscs_connection *conn,
+void client_read_complete(struct udscs_connection **connp,
struct udscs_message_header *header, const uint8_t *data)
{
switch (header->type) {
@@ -316,7 +316,8 @@ int client_read_complete(struct udscs_connection *conn,
if (header->size != sizeof(*res)) {
fprintf(stderr,
"guest xorg resolution message has wrong size, disconnecting client\n");
- return -1;
+ udscs_destroy_connection(connp);
+ return;
}
/* Now that we know the xorg resolution setup the uinput device */
@@ -338,14 +339,12 @@ int client_read_complete(struct udscs_connection *conn,
case VDAGENTD_CLIPBOARD_REQUEST:
case VDAGENTD_CLIPBOARD_DATA:
case VDAGENTD_CLIPBOARD_RELEASE:
- do_client_clipboard(conn, header, data);
+ do_client_clipboard(*connp, header, data);
break;
default:
fprintf(stderr, "unknown message from vdagent client: %u, ignoring\n",
header->type);
}
-
- return 0;
}
/* main */