1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

msg: use new macro to define max packet size

This commit is contained in:
Steffen Vogel 2017-05-23 13:55:13 +02:00
parent 8380077d5e
commit a1a56a9f0a
2 changed files with 4 additions and 1 deletions

View file

@ -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.

View file

@ -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));