Merge "Endian swap the message size parameter."
diff --git a/cc/gfxspy/src/Loader.cpp b/cc/gfxspy/src/Loader.cpp
index ad9be43..8624a09 100644
--- a/cc/gfxspy/src/Loader.cpp
+++ b/cc/gfxspy/src/Loader.cpp
@@ -167,7 +167,7 @@
             // (e.g.  "foolibEGL.so"), but we do want to intercept calls that begin
             // with a path (e.g. "/system/lib/libEGL.so").
             if (matchedString == filename || (*(matchedString - 1)) == '/') {
-                ALOGI("Changing dlopen(\"%s\", %d) to sRealDlopenPointer(\"libgfxspy.so\", %d).",
+                ALOGI("Changing dlopen(\"%s\", %d) to realDlopen(\"libgfxspy.so\", %d).",
                         filename, flag, flag);
                 filename = "libgfxspy.so";
             }
diff --git a/cc/gfxspy/src/gltrace_transport.cpp b/cc/gfxspy/src/gltrace_transport.cpp
index aafc192..4d55b3f 100644
--- a/cc/gfxspy/src/gltrace_transport.cpp
+++ b/cc/gfxspy/src/gltrace_transport.cpp
@@ -171,7 +171,7 @@
 }
 
 void BufferedOutputStream::enqueueMessage(GLMessage *msg) {
-    const uint32_t len = msg->ByteSize();
+    const uint32_t len = htonl(msg->ByteSize());
 
     // Send the message size, then the message.
     mStringBuffer.append((const char *)&len, sizeof(len));