[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10783: migrate patch from rtmp bran
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10783: migrate patch from rtmp branch to fix build problem. |
Date: |
Fri, 10 Apr 2009 14:20:02 -0600 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10783
committer: address@hidden
branch nick: trunk
timestamp: Fri 2009-04-10 14:20:02 -0600
message:
migrate patch from rtmp branch to fix build problem.
modified:
libamf/amf_msg.cpp
=== modified file 'libamf/amf_msg.cpp'
--- a/libamf/amf_msg.cpp 2009-03-29 13:08:23 +0000
+++ b/libamf/amf_msg.cpp 2009-04-10 20:20:02 +0000
@@ -44,9 +44,15 @@
size_t size = sizeof(AMF_msg::context_header_t);
boost::shared_ptr<amf::Buffer> buf (new amf::Buffer(size));
- *buf = htons(version);
- *buf += htons(headers);
- *buf += htons(messages);
+ // use a short as a temporary, as it turns out htons() returns a 32bit int
+ // instead when compiling with -O2. This forces appending bytes to get the
+ // right size.
+ boost::uint16_t swapped = htons(version);
+ *buf = swapped;
+ swapped = htons(headers);
+ *buf += swapped;
+ swapped = htons(messages);
+ *buf += swapped;
return buf;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10783: migrate patch from rtmp branch to fix build problem.,
rob <=