[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10456: Make remote call number an i
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10456: Make remote call number an instance member (from a static). No more failures in remoting.as. |
Date: |
Wed, 17 Dec 2008 21:55:37 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10456
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Wed 2008-12-17 21:55:37 +0100
message:
Make remote call number an instance member (from a static). No more failures
in remoting.as.
modified:
libcore/asobj/NetConnection_as.cpp
libcore/asobj/NetConnection_as.h
testsuite/misc-ming.all/remoting.as
=== modified file 'libcore/asobj/NetConnection_as.cpp'
--- a/libcore/asobj/NetConnection_as.cpp 2008-12-17 20:28:28 +0000
+++ b/libcore/asobj/NetConnection_as.cpp 2008-12-17 20:55:37 +0000
@@ -477,12 +477,20 @@
as_object(getNetConnectionInterface()),
_callQueues(),
_currentCallQueue(0),
+ _numCalls(0),
+ _uri(),
_isConnected(false),
_advanceTimer(0)
{
attachProperties(*this);
}
+unsigned int
+NetConnection_as::nextCallNumber()
+{
+ return ++_numCalls;
+}
+
// extern (used by Global.cpp)
void
netconnection_class_init(as_object& global)
@@ -639,6 +647,8 @@
_callQueues.push_back(_currentCallQueue.release());
}
+ _numCalls=0;
+
// Close any current connections. (why?) Because that's what happens.
close();
@@ -893,8 +903,6 @@
}
}
- static int call_number = 0;
-
boost::scoped_ptr<SimpleBuffer> buf (new SimpleBuffer(32));
// method name
@@ -909,8 +917,7 @@
// TESTED manually by strk
if ( asCallback )
{
- ++call_number;
- os << call_number;
+ os << ptr->nextCallNumber();
}
const std::string callNumberString = os.str();
=== modified file 'libcore/asobj/NetConnection_as.h'
--- a/libcore/asobj/NetConnection_as.h 2008-12-15 15:41:44 +0000
+++ b/libcore/asobj/NetConnection_as.h 2008-12-17 20:55:37 +0000
@@ -91,6 +91,8 @@
/// Get an stream by name
std::auto_ptr<IOChannel> getStream(const std::string& name);
+ unsigned int nextCallNumber();
+
protected:
/// Mark responders associated with remoting calls
@@ -107,10 +109,27 @@
/// Extend the URL to be used for playing
void addToURL(const std::string& url);
+ /// Queue of call groups
+ //
+ /// For HTTP based remoting, each element on this list
+ /// will perform a POST request containing all calls
+ /// to the same uri and dispatch results.
+ ///
std::list<AMFQueue*> _callQueues;
+ /// Queue of calls gathered during a single movie advancement
+ //
+ /// For HTTP based remoting, these calls will be performed
+ /// by a single POST operation.
+ ///
std::auto_ptr<AMFQueue> _currentCallQueue;
+ /// Number of calls queued for current connection
+ //
+ /// TODO: make it a member of AMFQueue
+ ///
+ unsigned int _numCalls;
+
/// the url prefix optionally passed to connect()
std::string _uri;
=== modified file 'testsuite/misc-ming.all/remoting.as'
--- a/testsuite/misc-ming.all/remoting.as 2008-12-17 20:28:28 +0000
+++ b/testsuite/misc-ming.all/remoting.as 2008-12-17 20:55:37 +0000
@@ -161,7 +161,7 @@
#else
// The bug here is that gnash encodes 0 as the length of the array
while
// the expected behaviour is to encode 3 (for SWF6 or lower!)
- xcheck_equals(res.hex,
'0a:00:00:00:01:08:00:00:00:03:00:03:32:2e:35:00:3f:f0:00:00:00:00:00:00:00:00:09');
+ check_equals(res.hex,
'0a:00:00:00:01:08:00:00:00:03:00:03:32:2e:35:00:3f:f0:00:00:00:00:00:00:00:00:09');
#endif
};
@@ -252,7 +252,7 @@
//note(printInfo(res));
check(res.remote_port != connectionPort);
connectionPort = res.remote_port;
- xcheck_equals(res.request_id, '/1'); // connection is reset
+ check_equals(res.request_id, '/1'); // connection is reset
check_equals(res.message, 'ary_newconnect');
check_equals(res.arg1_type, 'STRICT_ARRAY');
check_equals(res.hex, '0a:00:00:00:01:0a:00:00:00:00');
@@ -268,7 +268,7 @@
//note(printInfo(res));
check(res.remote_port != connectionPort);
connectionPort = res.remote_port;
- xcheck_equals(res.request_id, '/1'); // connection is reset
+ check_equals(res.request_id, '/1'); // connection is reset
check_equals(res.message, 'ary_newconnect2');
check_equals(res.arg1_type, 'STRICT_ARRAY');
check_equals(res.hex, '0a:00:00:00:01:0a:00:00:00:00');
@@ -290,7 +290,7 @@
// on next frame
check(res.remote_port != connectionPort);
connectionPort = res.remote_port;
- xcheck_equals(res.request_id, '/2');
+ check_equals(res.request_id, '/2');
check_equals(res.message, 'ary_newconnect');
check_equals(res.arg1_type, 'STRICT_ARRAY');
check_equals(res.hex, '0a:00:00:00:01:0a:00:00:00:00');
@@ -309,7 +309,7 @@
// on next frame
check(res.remote_port != connectionPort);
connectionPort = res.remote_port;
- xcheck_equals(res.request_id, '/3');
+ check_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');
@@ -323,7 +323,7 @@
// connection ID is NOT reset if the call happens
// on next frame
check_equals(res.remote_port, connectionPort);
- xcheck_equals(res.request_id, '/4');
+ check_equals(res.request_id, '/4');
check_equals(res.message, 'multiarg');
check_equals(res.arg_count, '5');
check_equals(res.hex,
'0a:00:00:00:05:0a:00:00:00:00:02:00:01:61:03:00:01:64:00:3f:f0:00:00:00:00:00:00:00:01:62:02:00:01:63:00:00:09:05:06');
@@ -334,7 +334,7 @@
o.onResult = function(res) {
//note(printInfo(res));
check_equals(res.remote_port, connectionPort);
- xcheck_equals(res.request_id, '/5');
+ check_equals(res.request_id, '/5');
check_equals(res.message, '25.53');
check_equals(res.arg_count, '0');
check_equals(res.hex, '0a:00:00:00:00');
@@ -345,7 +345,7 @@
o.onResult = function(res) {
//note(printInfo(res));
check_equals(res.remote_port, connectionPort);
- xcheck_equals(res.request_id, '/6');
+ check_equals(res.request_id, '/6');
check_equals(res.message, 'true');
check_equals(res.arg_count, '0');
check_equals(res.hex, '0a:00:00:00:00');
@@ -357,7 +357,7 @@
o.onResult = function(res) {
//note(printInfo(res));
check_equals(res.remote_port, connectionPort);
- xcheck_equals(res.request_id, '/7');
+ check_equals(res.request_id, '/7');
check_equals(res.message, 'toString');
check_equals(res.arg_count, '0');
check_equals(res.hex, '0a:00:00:00:00');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10456: Make remote call number an instance member (from a static). No more failures in remoting.as.,
Sandro Santilli <=