diff options
author | Roger Dingledine <arma@torproject.org> | 2004-01-02 09:03:38 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-01-02 09:03:38 +0000 |
commit | 53061b3778167a9c4968b12c6d60e43301af46b7 (patch) | |
tree | 6a0fa36cab54d2bef96c57da55e6701611c6de9d /src/or/connection_edge.c | |
parent | c2e37901be4187bb209581bab31db0c305bb53cd (diff) | |
download | tor-53061b3778167a9c4968b12c6d60e43301af46b7.tar tor-53061b3778167a9c4968b12c6d60e43301af46b7.tar.gz |
fix endian issue: rh.integrity was getting sent wrong
now it's a char[4] rather than an int
svn:r966
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 74de28c7d..d8c23d90c 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -24,7 +24,7 @@ void relay_header_pack(char *dest, const relay_header_t *src) { *(uint8_t*)(dest) = src->command; *(uint16_t*)(dest+1) = htons(src->recognized); *(uint16_t*)(dest+3) = htons(src->stream_id); - *(uint32_t*)(dest+5) = htonl(src->integrity); + memcpy(dest+5, src->integrity, 4); *(uint16_t*)(dest+9) = htons(src->length); } @@ -32,7 +32,7 @@ void relay_header_unpack(relay_header_t *dest, const char *src) { dest->command = *(uint8_t*)(src); dest->recognized = ntohs(*(uint16_t*)(src+1)); dest->stream_id = ntohs(*(uint16_t*)(src+3)); - dest->integrity = ntohl(*(uint32_t*)(src+5)); + memcpy(dest->integrity, src+5, 4); dest->length = ntohs(*(uint16_t*)(src+9)); } |