From 545fbb8b11894ff38ca354679fd3c41c067a5d44 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 19 Apr 2018 08:40:38 +0200 Subject: [PATCH] streaming: define max of number of concurrent streams This definition is lacking in client while in server it is hardcoded to 50. Having a well defined limitation allow us to make the code more robust and optimized. Signed-off-by: Victor Toso Acked-by: Frediano Ziglio --- spice/protocol.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spice/protocol.h b/spice/protocol.h index cbf2f01..6cc65b8 100644 --- a/spice/protocol.h +++ b/spice/protocol.h @@ -45,6 +45,12 @@ #define SPICE_TICKET_KEY_PAIR_LENGTH 1024 #define SPICE_TICKET_PUBKEY_BYTES (SPICE_TICKET_KEY_PAIR_LENGTH / 8 + 34) +/* + * This is the maximum number of streams possible. + * IDs will be in the interval [0, SPICE_MAX_NUM_STREAMS). + */ +#define SPICE_MAX_NUM_STREAMS 64 + typedef struct SPICE_ATTR_PACKED SpiceLinkHeader { uint32_t magic; uint32_t major_version;