gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/rtmp r9990: reverse the properties in the


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9990: reverse the properties in the echo response for a Typed Object array.
Date: Mon, 16 Feb 2009 17:36:57 -0700
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9990
committer: address@hidden
branch nick: rtmp
timestamp: Mon 2009-02-16 17:36:57 -0700
message:
  reverse the properties in the echo response for a Typed Object array.
modified:
  libnet/http.cpp
=== modified file 'libnet/http.cpp'
--- a/libnet/http.cpp   2009-02-16 23:12:42 +0000
+++ b/libnet/http.cpp   2009-02-17 00:36:57 +0000
@@ -1171,22 +1171,18 @@
 {
 //    GNASH_REPORT_FUNCTION;
     boost::shared_ptr<amf::Buffer> data;
-    amf::Element nel = el;
 
-#if 0
-    if (el.getType() == amf::Element::STRICT_ARRAY_AMF0) {
+#if 1
+    amf::Element nel;
+    if (el.getType() == amf::Element::TYPED_OBJECT_AMF0) {
+       nel.makeTypedObject();
+       string name = el.getName();
+       nel.setName(name);
        if (el.propertySize()) {
-           for (int i=0 ; i<el.propertySize(); i++) {
+           for (int i=el.propertySize()-1; i>=0; i--) {
+//         for (int i=0 ; i<el.propertySize(); i++) {
                boost::shared_ptr<amf::Element> child = el.getProperty(i);
-               boost::shared_ptr<amf::Element> newprop(new amf::Element);
-               *newprop = child;
-               if (child->getType() == amf::Element::OBJECT_AMF0) {
-                   for (int j=child->propertySize()-1; j>=0; j--) {
-//                 for (int j=0; j<child->propertySize(); j++) {
-                       newprop->addProperty(child->getProperty(j));
-                   }
-               }
-               nel.addProperty(newprop);
+               nel.addProperty(child);
            }
            data = nel.encode();
        } else {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]