[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9611: use _properties instead of _va
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9611: use _properties instead of _variables. |
Date: |
Wed, 27 Aug 2008 19:27:20 -0600 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9611
committer: address@hidden
branch nick: rtmp
timestamp: Wed 2008-08-27 19:27:20 -0600
message:
use _properties instead of _variables.
modified:
libnet/rtmp_server.cpp
=== modified file 'libnet/rtmp_server.cpp'
--- a/libnet/rtmp_server.cpp 2008-08-20 16:31:57 +0000
+++ b/libnet/rtmp_server.cpp 2008-08-28 01:27:20 +0000
@@ -62,7 +62,7 @@
RTMPServer::~RTMPServer()
{
// GNASH_REPORT_FUNCTION;
- _variables.clear();
+ _properties.clear();
// delete _body;
}
@@ -190,6 +190,10 @@
AMF amf;
//
address@hidden@\000\000\000\000\000\000\003\000\003app\002\000#software/gnash/tests/1153948634.flv\000\bflashVer\002\000\fLNX
6,0,82,0\000\006swfUrl\002\000\035file:///file|address@hidden://localhost/software/gnash/tests/1153948634
+ if (buf->reference() == 0) {
+ return false;
+ }
+
amf_index = *buf->reference() & RTMP_INDEX_MASK;
headersize = headerSize(*buf->reference());
log_debug (_("The Header size is: %d"), headersize);
@@ -230,7 +234,7 @@
if (el != 0) {
size += amf_obj.totalsize();
ptr += amf_obj.totalsize();
-// _variables[el->getName()] = el;
+// _properties[el->getName()] = el;
} else {
break;
}
@@ -619,16 +623,15 @@
amf::Buffer *
RTMPServer::encodePing(rtmp_ping_e type, boost::uint32_t milliseconds)
{
-// GNASH_REPORT_FUNCTION;
+ GNASH_REPORT_FUNCTION;
Buffer *buf = new Buffer(sizeof(boost::uint16_t) * 4);
Network::byte_t *ptr = buf->reference();
- // default everything to zeros, real data gets optionally added.
- buf->clear();
-// boost::uint16_t typefield = (reinterpret_cast<boost::uint16_t>(type));
- boost::uint16_t typefield = ntohs(type);
+ buf->clear(); // default everything to zeros, real data gets
optionally added.
+ boost::uint16_t typefield = *reinterpret_cast<boost::uint16_t *>(&type);
ptr += sizeof(boost::uint16_t); // go past the first short
+
boost::uint32_t swapped = 0;
-// swapBytes(&typefield, sizeof(boost::uint16_t));
+ swapBytes(&typefield, sizeof(boost::uint16_t));
buf->copy(typefield);
switch (type) {
// These two don't appear to have any paramaters
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9611: use _properties instead of _variables.,
rob <=