Reorganize message size constants

Make the max clipboard text length depend on the max message size.
This commit is contained in:
Romain Vimont
2020-06-04 21:09:42 +02:00
parent 6e1069a822
commit 8f314c74b0
4 changed files with 15 additions and 12 deletions

View File

@@ -7,8 +7,9 @@
#include "config.h"
#define DEVICE_MSG_TEXT_MAX_LENGTH 4093
#define DEVICE_MSG_SERIALIZED_MAX_SIZE (3 + DEVICE_MSG_TEXT_MAX_LENGTH)
#define DEVICE_MSG_SERIALIZED_MAX_SIZE 4096
// type: 1 byte; length: 2 bytes
#define DEVICE_MSG_TEXT_MAX_LENGTH (DEVICE_MSG_SERIALIZED_MAX_SIZE - 3)
enum device_msg_type {
DEVICE_MSG_TYPE_CLIPBOARD,