gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. a9604ad7a533579afc3b


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. a9604ad7a533579afc3b8c2a2bdbb78bf6a9bae6
Date: Fri, 26 Nov 2010 12:48:29 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  a9604ad7a533579afc3b8c2a2bdbb78bf6a9bae6 (commit)
       via  e765f3799e13ba63b8a07727ec2bed554ad4c9cd (commit)
      from  9df5cf7a3c19001855238837d70161923999fcb0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=a9604ad7a533579afc3b8c2a2bdbb78bf6a9bae6


commit a9604ad7a533579afc3b8c2a2bdbb78bf6a9bae6
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Nov 26 13:36:28 2010 +0100

    Pass argument with remote function calls, fixing failing tests.

diff --git a/libcore/asobj/NetConnection_as.cpp 
b/libcore/asobj/NetConnection_as.cpp
index cd56124..ba6621a 100644
--- a/libcore/asobj/NetConnection_as.cpp
+++ b/libcore/asobj/NetConnection_as.cpp
@@ -1223,6 +1223,7 @@ void
 RTMPConnection::handleInvoke(const boost::uint8_t* payload,
         const boost::uint8_t* end)
 {
+    // TODO: clean up the logic in this function to reduce duplication.
 
     assert(payload != end);
 
@@ -1310,9 +1311,19 @@ RTMPConnection::handleInvoke(const boost::uint8_t* 
payload,
         callMethod(&_nc.owner(), NSV::PROP_ON_STATUS, arg);
         return;
     }
+
+    // Parse any arguments.
+    as_value arg;
+
+    amf::Reader rd(payload, end, getGlobal(_nc.owner()));
+    // TODO: use all args and check the order! We currently only use
+    // the last one!
+    while (rd(arg)) {
+        log_debug("Value: %s", arg);
+    }
     
     // Call method on the NetConnection object.    
-    callMethod(&_nc.owner(), methodname);
+    callMethod(&_nc.owner(), methodname, arg);
     
 }
 
diff --git a/testsuite/misc-ming.all/rtmpytest.as 
b/testsuite/misc-ming.all/rtmpytest.as
index 5816a36..073d1cf 100644
--- a/testsuite/misc-ming.all/rtmpytest.as
+++ b/testsuite/misc-ming.all/rtmpytest.as
@@ -202,52 +202,52 @@ ncrtmp.disconnected = function(arg) {
 welcomecalls = 0;
 ncrtmp.welcome = function(arg) {
     ++welcomecalls;
-    xcheck_equals(arg[0].toString(), "You have connected!");
+    check_equals(arg[0].toString(), "You have connected!");
     trace(dumpObject(arg[1]));
 };
 
 connectcalls = 0;
 ncrtmp.initial = function(arg) {
     ++connectcalls;
-    xcheck_equals(arg[0].toString(), "connection attempt received");
+    check_equals(arg[0].toString(), "connection attempt received");
     o = arg[1];
 
-    xcheck(o.hasOwnProperty("fpad"));
-    xcheck_equals(typeof(o.fpad), "boolean");
-    xcheck_equals(o.fpad, false);
+    check(o.hasOwnProperty("fpad"));
+    check_equals(typeof(o.fpad), "boolean");
+    check_equals(o.fpad, false);
 
-    xcheck(o.hasOwnProperty("pageUrl"));
+    check(o.hasOwnProperty("pageUrl"));
     check_equals(typeof(o.pageUrl), "undefined");
     check_equals(o.pageUrl, undefined);
 
-    xcheck(o.hasOwnProperty("videoFunction"));
-    xcheck_equals(typeof(o.videoFunction), "number");
-    xcheck_equals(o.videoFunction, 1);
+    check(o.hasOwnProperty("videoFunction"));
+    check_equals(typeof(o.videoFunction), "number");
+    check_equals(o.videoFunction, 1);
 
-    xcheck(o.hasOwnProperty("tcUrl"));
-    xcheck_equals(typeof(o.tcUrl), "string");
-    xcheck_equals(o.tcUrl, rtmpuri);
+    check(o.hasOwnProperty("tcUrl"));
+    check_equals(typeof(o.tcUrl), "string");
+    check_equals(o.tcUrl, rtmpuri);
 
-    xcheck(o.hasOwnProperty("app"));
-    xcheck_equals(typeof(o.app), "string");
-    xcheck_equals(o.app, "rtmpyecho");
+    check(o.hasOwnProperty("app"));
+    check_equals(typeof(o.app), "string");
+    check_equals(o.app, "rtmpyecho");
 
-    xcheck(o.hasOwnProperty("flashVer"));
-    xcheck_equals(typeof(o.flashVer), "string");
-    xcheck_equals(o.flashVer, $version);
+    check(o.hasOwnProperty("flashVer"));
+    check_equals(typeof(o.flashVer), "string");
+    check_equals(o.flashVer, $version);
 
-    xcheck(o.hasOwnProperty("audioCodecs"));
-    xcheck_equals(typeof(o.audioCodecs), "number");
+    check(o.hasOwnProperty("audioCodecs"));
+    check_equals(typeof(o.audioCodecs), "number");
 
-    xcheck(o.hasOwnProperty("videoCodecs"));
-    xcheck_equals(typeof(o.videoCodecs), "number");
+    check(o.hasOwnProperty("videoCodecs"));
+    check_equals(typeof(o.videoCodecs), "number");
 
-    xcheck(o.hasOwnProperty("swfUrl"));
-    xcheck_equals(typeof(o.swfUrl), "string");
-    xcheck_equals(o.swfUrl, _url);
+    check(o.hasOwnProperty("swfUrl"));
+    check_equals(typeof(o.swfUrl), "string");
+    check_equals(o.swfUrl, _url);
 
-    xcheck(o.hasOwnProperty("capabilities"));
-    xcheck_equals(typeof(o.capabilities), "number");
+    check(o.hasOwnProperty("capabilities"));
+    check_equals(typeof(o.capabilities), "number");
 
     trace(dumpObject(arg[1]));
 };

http://git.savannah.gnu.org/cgit//commit/?id=e765f3799e13ba63b8a07727ec2bed554ad4c9cd


commit e765f3799e13ba63b8a07727ec2bed554ad4c9cd
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Nov 26 13:21:04 2010 +0100

    Add more tests.

diff --git a/testsuite/misc-ming.all/rtmpytest.as 
b/testsuite/misc-ming.all/rtmpytest.as
index 359bd06..5816a36 100644
--- a/testsuite/misc-ming.all/rtmpytest.as
+++ b/testsuite/misc-ming.all/rtmpytest.as
@@ -28,7 +28,7 @@ endOfTest = function()
     check_equals(welcomecalls, 1);
     check_equals(connectcalls, 1);
 
-    totals(57);
+    totals(70);
     trace("ENDOFTEST");
     play();
 };
@@ -40,6 +40,7 @@ if (rtmpport == undefined) {
     rtmpport = 9984;
     note("No RTMP port specified, defaulting to "+rtmpport);
 }
+rtmpuri = "rtmp://"+hostname+":"+rtmpport+"/rtmpyecho";
 
 test1 = function(nc)
 {
@@ -212,33 +213,45 @@ ncrtmp.initial = function(arg) {
     o = arg[1];
 
     xcheck(o.hasOwnProperty("fpad"));
+    xcheck_equals(typeof(o.fpad), "boolean");
     xcheck_equals(o.fpad, false);
 
     xcheck(o.hasOwnProperty("pageUrl"));
-
+    check_equals(typeof(o.pageUrl), "undefined");
     check_equals(o.pageUrl, undefined);
 
     xcheck(o.hasOwnProperty("videoFunction"));
+    xcheck_equals(typeof(o.videoFunction), "number");
+    xcheck_equals(o.videoFunction, 1);
 
     xcheck(o.hasOwnProperty("tcUrl"));
+    xcheck_equals(typeof(o.tcUrl), "string");
+    xcheck_equals(o.tcUrl, rtmpuri);
 
     xcheck(o.hasOwnProperty("app"));
+    xcheck_equals(typeof(o.app), "string");
     xcheck_equals(o.app, "rtmpyecho");
 
     xcheck(o.hasOwnProperty("flashVer"));
+    xcheck_equals(typeof(o.flashVer), "string");
     xcheck_equals(o.flashVer, $version);
 
     xcheck(o.hasOwnProperty("audioCodecs"));
+    xcheck_equals(typeof(o.audioCodecs), "number");
+
     xcheck(o.hasOwnProperty("videoCodecs"));
+    xcheck_equals(typeof(o.videoCodecs), "number");
 
     xcheck(o.hasOwnProperty("swfUrl"));
+    xcheck_equals(typeof(o.swfUrl), "string");
+    xcheck_equals(o.swfUrl, _url);
 
     xcheck(o.hasOwnProperty("capabilities"));
+    xcheck_equals(typeof(o.capabilities), "number");
 
     trace(dumpObject(arg[1]));
 };
 
-rtmpuri = "rtmp://"+hostname+":"+rtmpport+"/rtmpyecho";
 note("Connecting to "+rtmpuri);
 ncrtmp.connect(rtmpuri);
 

-----------------------------------------------------------------------

Summary of changes:
 libcore/asobj/NetConnection_as.cpp   |   13 ++++++++-
 testsuite/misc-ming.all/rtmpytest.as |   49 +++++++++++++++++++++------------
 2 files changed, 43 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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