gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/rtmp r9769: merge changes to branch.


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9769: merge changes to branch.
Date: Fri, 21 Nov 2008 22:24:59 -0700
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9769
committer: address@hidden
branch nick: rtmp
timestamp: Fri 2008-11-21 22:24:59 -0700
message:
  merge changes to branch.
modified:
  libnet/network.h
  libnet/rtmp.cpp
    ------------------------------------------------------------
    revno: 9764.1.1
    committer: strk <address@hidden>
    branch nick: rtmp
    timestamp: Fri 2008-11-21 21:43:53 +0100
    message:
      specify units for the timeout argument of readNet/writeNet
    modified:
      libnet/network.h
    ------------------------------------------------------------
    revno: 9764.1.2
    committer: strk <address@hidden>
    branch nick: rtmp
    timestamp: Fri 2008-11-21 22:09:15 +0100
    message:
      RTMP::recvMsg: read NETBUFSIZE bytes, not timeout bytes
    modified:
      libnet/rtmp.cpp
=== modified file 'libnet/network.h'
--- a/libnet/network.h  2008-11-19 20:13:25 +0000
+++ b/libnet/network.h  2008-11-21 20:43:53 +0000
@@ -141,7 +141,7 @@
     ///
     /// @param buffer A Buffer class to hold the data.
     ///
-    /// @param timeout An optional timeout value for reading data.
+    /// @param timeout An optional timeout for reading data, in seconds.
     ///
     /// @param fd The optional file descriptor to read data from.
     ///
@@ -162,7 +162,7 @@
     ///
     /// @param buffer A Buffer class holding the data.
     ///
-    /// @param timeout An optional timeout value for writing data.
+    /// @param timeout An optional timeout for writing data, in seconds.
     ///
     /// @param fd The optional file descriptor to write data to from.
     ///

=== modified file 'libnet/rtmp.cpp'
--- a/libnet/rtmp.cpp   2008-11-18 19:49:16 +0000
+++ b/libnet/rtmp.cpp   2008-11-21 21:09:15 +0000
@@ -1005,11 +1005,12 @@
     int ret = 0;
     bool nopacket = true;
 
-    boost::shared_ptr<amf::Buffer> buf(new Buffer);
+    boost::shared_ptr<amf::Buffer> buf(new Buffer(NETBUFSIZE));
     while (nopacket) {
-       ret = readNet(buf->reference(), timeout);
+       ret = readNet(buf->reference(), buf->size(), timeout);
        if (ret <= 0) {
            log_error("Never got any data at line %d", __LINE__);
+           buf.reset(); // no point in returning a buffer, right?
            return buf;
        }
        if ((ret == 1) && (*(buf->reference()) == 0xff)) {


reply via email to

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