From ebd34a42913132f80decb6aa89b1c3cb2e2666ec Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 18 Jun 2010 17:12:07 +0200 Subject: [PATCH] Make ping data @as_ptr to avoid copying data --- common/messages.h | 2 ++ spice.proto | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/messages.h b/common/messages.h index 2ba14bf..e317949 100644 --- a/common/messages.h +++ b/common/messages.h @@ -150,6 +150,8 @@ typedef struct SpiceMsgMainMouseMode { typedef struct SpiceMsgPing { uint32_t id; uint64_t timestamp; + void *data; + uint32_t data_len; } SpiceMsgPing; typedef struct SpiceMsgMainAgentDisconnect { diff --git a/spice.proto b/spice.proto index 6750d2d..bad9ed3 100644 --- a/spice.proto +++ b/spice.proto @@ -111,7 +111,7 @@ channel BaseChannel { message { uint32 id; uint64 timestamp; - uint8 data[] @end @ctype(uint8_t); + uint8 data[] @end @ctype(uint8_t) @as_ptr(data_len); } ping; message {