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

changed order of samples in a single multiplexed packet

This commit is contained in:
Steffen Vogel 2015-05-06 13:21:10 +02:00
parent 7997f4e7a4
commit be6d4262d7

View file

@ -185,7 +185,7 @@ int socket_read(struct node *n, struct msg *pool, int poolsize, int first, int c
for (int i = 0; i < cnt; i++) {
/* All messages of a packet must have equal length! */
iov[i].iov_base = &pool[(first+poolsize-i) % poolsize];
iov[i].iov_base = &pool[(first+poolsize+i) % poolsize];
iov[i].iov_len = bytes / cnt;
}
@ -197,7 +197,7 @@ int socket_read(struct node *n, struct msg *pool, int poolsize, int first, int c
serror("Failed recv");
for (int i = 0; i < cnt; i++) {
struct msg *n = &pool[(first+poolsize-i) % poolsize];
struct msg *n = &pool[(first+poolsize+i) % poolsize];
/* Check integrity of packet */
bytes -= MSG_LEN(n->length);