gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10445: Have the remoting server ret


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10445: Have the remoting server return number of arguments passed, test passing no args at all
Date: Tue, 16 Dec 2008 17:32:05 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10445
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Tue 2008-12-16 17:32:05 +0100
message:
  Have the remoting server return number of arguments passed, test passing no 
args at all
modified:
  testsuite/misc-ming.all/remoting.as
  testsuite/misc-ming.all/remoting.php
=== modified file 'testsuite/misc-ming.all/remoting.as'
--- a/testsuite/misc-ming.all/remoting.as       2008-12-15 15:41:44 +0000
+++ b/testsuite/misc-ming.all/remoting.as       2008-12-16 16:32:05 +0000
@@ -24,7 +24,7 @@
 endOfTest = function()
 {
        //note("END OF TEST");
-       check_totals(79);
+       check_totals(84);
 };
 
 
@@ -295,6 +295,25 @@
 
 function test16()
 {
+    o={onStatus:handleOnStatus};
+    nc.call("noarg", o); // no arguments
+    o.onResult = function(res) {
+        //note(printInfo(res));
+
+        // connection ID is NOT reset if the call happens
+        // on next frame
+        check(res.remote_port != connectionPort);
+        connectionPort = res.remote_port;
+        xcheck_equals(res.request_id, '/3');
+        check_equals(res.message, 'noarg');
+        check_equals(res.arg_count, '0');
+        check_equals(res.hex, '0a:00:00:00:00');
+        test17();
+    };
+}
+
+function test17()
+{
     endOfTest();
 }
 

=== modified file 'testsuite/misc-ming.all/remoting.php'
--- a/testsuite/misc-ming.all/remoting.php      2008-12-15 12:01:11 +0000
+++ b/testsuite/misc-ming.all/remoting.php      2008-12-16 16:32:05 +0000
@@ -83,11 +83,23 @@
        }
 }
 
+function arg_count($amf) {
+       if(ord($amf[0]) != 0x0a) {
+               return "couldn't find args";
+       } else {
+               $i = 1; # done with first byte
+               $num_args = get_long($amf, $i); $i += 4;
+        return $num_args;
+    }
+}
+
 function raw_rpc_to_array($amf, $extras) {
        $ret = array();
     #phpinfo();
     $ret['remote_port'] = $_SERVER['REMOTE_PORT'];
        $ret['arg1_type'] = arg1_type($amf);
+       $ret['arg_count'] = arg_count($amf);
+    # TODO: return an 'args' array member, containing info about all arguments
        $ret['type'] = $ret['arg1_type']; # depricated. used arg1_type
        $ret['hex'] = hexify($amf);
        $ret['message'] = $extras['message_name'];


reply via email to

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