mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-06 01:20:50 +00:00
Do it by adding @end tag. Without it the allocated memory has no space for 'name'. Also fix SpiceMsgMainArrayMessage tests/test-marshallers.h, replacing int8_t* name with int8_t name[0]. This makes name an "in-structure" array with no pre-defined size instead of a pointer. The size is defined by the message size. Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
32 lines
614 B
Protocol Buffer
32 lines
614 B
Protocol Buffer
channel TestChannel {
|
|
message {
|
|
uint8 dummy_byte; // so structure is not aligned
|
|
uint32 data_size;
|
|
uint64 *data[data_size] @marshall;
|
|
} ShortDataSubMarshall;
|
|
|
|
message {
|
|
int8 name[] @end;
|
|
} ArrayMessage;
|
|
|
|
message {
|
|
uint8 res1 @zero;
|
|
uint16 n;
|
|
uint32 res2 @zero;
|
|
} Zeroes;
|
|
|
|
message {
|
|
uint32 num_of_channels;
|
|
uint16 channels[num_of_channels] @end;
|
|
} @ctype(SpiceMsgChannels) channels_list;
|
|
|
|
message {
|
|
uint32 dummy[2];
|
|
uint8 data[] @end;
|
|
} LenMessage;
|
|
};
|
|
|
|
protocol Spice {
|
|
TestChannel main = 1;
|
|
};
|