From d80d9afd884a1f07ff92a8d0f503bc44f58735de Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Fri, 12 Oct 2012 06:27:56 -0500 Subject: [PATCH] preliminary work on a fix to the ARM aliasing issues --- src/processors/hybi_header.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/processors/hybi_header.cpp b/src/processors/hybi_header.cpp index 053f75a489..da1eb0978a 100644 --- a/src/processors/hybi_header.cpp +++ b/src/processors/hybi_header.cpp @@ -126,6 +126,14 @@ void hybi_header::set_payload_size(uint64_t size) { } m_payload_size = size; *(reinterpret_cast(&m_header[BASIC_HEADER_LENGTH])) = htons(static_cast(size)); + + /* uint16_t net_size = htons(static_cast(size)); + //memcpy(&m_header[BASIC_HEADER_LENGTH], &net_size, sizeof(uint16_t)); + std::copy( + reinterpret_cast(&net_size), + reinterpret_cast(&net_size)+sizeof(uint16_t), + &m_header[BASIC_HEADER_LENGTH] + );*/ } else if (size <= frame::limits::PAYLOAD_SIZE_JUMBO) { if (get_masked()) { // shift mask bytes to the correct position given the new size