Commit 94984976 authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Adam Wujek

msg.c: fix endianness while reading cField from frame

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 3447e609
......@@ -24,8 +24,8 @@ int msg_unpack_header(struct pp_instance *ppi, void *buf, int plen)
memcpy(hdr->flagField, (buf + 6), PP_FLAG_FIELD_LENGTH);
memcpy(&msb, (buf + 8), 4);
memcpy(&lsb, (buf + 12), 4);
msb = htonl(*(uint32_t *)(buf + 8));
lsb = htonl(*(uint32_t *)(buf + 12));
hdr->cField.secs = 0LL;
hdr->cField.scaled_nsecs = (uint64_t)msb << 32 | (uint64_t)lsb;
memcpy(&hdr->sourcePortIdentity.clockIdentity, (buf + 20),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment