diff --git a/include/villas/msg.h b/include/villas/msg.h index 133a457d9..194ffe1b3 100644 --- a/include/villas/msg.h +++ b/include/villas/msg.h @@ -27,6 +27,9 @@ struct msg; struct sample; +/** The maximum length of a packet which contains stuct msg. */ +#define MSG_MAX_PACKET_LEN 1500 + /** Swaps the byte-order of the message. * * Message are always transmitted in network (big endian) byte order. diff --git a/lib/nodes/socket.c b/lib/nodes/socket.c index 9eb8fcf9d..828375999 100644 --- a/lib/nodes/socket.c +++ b/lib/nodes/socket.c @@ -402,7 +402,7 @@ static int socket_write_villas(struct node *n, struct sample *smps[], unsigned c { struct socket *s = n->_vd; - char data[MAX_PACKETLEN]; + char data[MSG_MAX_PACKET_LEN]; ssize_t bytes = 0, sent; sent = msg_buffer_from_samples(smps, cnt, data, sizeof(data));