gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog cygnal/http.cpp cygnal/netstats...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog cygnal/http.cpp cygnal/netstats...
Date: Fri, 27 Apr 2007 07:49:36 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/27 07:49:36

Modified files:
        .              : ChangeLog 
        cygnal         : http.cpp netstats.cpp statistics.cpp stream.cpp 
        libbase        : network.cpp network.h 

Log message:
                * libbase/network.{cpp,h}: (writeNet): take a const string ref, 
not a
                  copy.
                * cygnal/: http.cpp, netstats.cpp, statistics.cpp, stream.cpp:
                  Hush compiler.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3014&r2=1.3015
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/http.cpp?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/netstats.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/statistics.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/stream.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/network.cpp?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/network.h?cvsroot=gnash&r1=1.15&r2=1.16

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3014
retrieving revision 1.3015
diff -u -b -r1.3014 -r1.3015
--- ChangeLog   27 Apr 2007 07:05:08 -0000      1.3014
+++ ChangeLog   27 Apr 2007 07:49:36 -0000      1.3015
@@ -1,3 +1,10 @@
+2007-04-27 Sandro Santilli <address@hidden>
+
+       * libbase/network.{cpp,h}: (writeNet): take a const string ref, not a
+         copy.
+       * cygnal/: http.cpp, netstats.cpp, statistics.cpp, stream.cpp:
+         Hush compiler.
+
 2007-04-27 Zou Lunkai <address@hidden>
 
        * server/asobj/Key.{cpp,h}:

Index: cygnal/http.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/http.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- cygnal/http.cpp     10 Apr 2007 21:10:56 -0000      1.6
+++ cygnal/http.cpp     27 Apr 2007 07:49:36 -0000      1.7
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: http.cpp,v 1.6 2007/04/10 21:10:56 nihilus Exp $ */
+/* $Id: http.cpp,v 1.7 2007/04/27 07:49:36 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -57,17 +57,19 @@
 }
 
 HTTP &
-HTTP::operator = (HTTP &obj)
+HTTP::operator = (HTTP& /*obj*/)
 {
     GNASH_REPORT_FUNCTION;
 //    this = obj;
+    // TODO: FIXME !
+    return *this; 
 }
 
 string
-HTTP::waitForGetRequest(Network &net)
+HTTP::waitForGetRequest(Network& /*net*/)
 {
     GNASH_REPORT_FUNCTION;
-    
+    return ""; // TODO: FIXME !
 }
 
 string
@@ -126,10 +128,13 @@
     char *length = strstr(reply, " XX");
     sprintf(length, " %d", filesize);
     
-    if (writeNet(reply, strlen(reply)) == strlen(reply)) {
+    int ret = writeNet(reply, strlen(reply));
+
+    if (ret >= 0 && (unsigned)ret == strlen(reply)) {
         dbglogfile << "Sent GET Reply: " << reply << endl;
     } else {
-        dbglogfile << "Couldn't send GET Reply" << endl;
+        dbglogfile << "Couldn't send GET Reply, writeNet returned " << ret << 
endl;
+       // TODO: FIXME: shouldn't we return false here ?
     }
     return true; // Default to true
 }

Index: cygnal/netstats.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/netstats.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- cygnal/netstats.cpp 10 Apr 2007 18:18:45 -0000      1.3
+++ cygnal/netstats.cpp 27 Apr 2007 07:49:36 -0000      1.4
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: netstats.cpp,v 1.3 2007/04/10 18:18:45 rsavoye Exp $ */
+/* $Id: netstats.cpp,v 1.4 2007/04/27 07:49:36 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -61,6 +61,7 @@
     _bytes = stats.getBytes();
     _codec = stats.getCodec();
     _type = stats.getFileType();
+    return *this;
 }
 
 } // end of cygnal namespace

Index: cygnal/statistics.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/statistics.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cygnal/statistics.cpp       17 Dec 2006 02:34:58 -0000      1.1
+++ cygnal/statistics.cpp       27 Apr 2007 07:49:36 -0000      1.2
@@ -80,7 +80,7 @@
 
 float
 Statistics::getFPS() {
-    
+       return 0.0; // TODO: FIXME !
 }
 
 int

Index: cygnal/stream.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/stream.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- cygnal/stream.cpp   10 Apr 2007 21:10:56 -0000      1.3
+++ cygnal/stream.cpp   27 Apr 2007 07:49:36 -0000      1.4
@@ -153,10 +153,12 @@
 }
 
 bool
-Stream::open(const char *filespec, int netfd) {
+Stream::open(const char *filespec, int /*netfd*/)
+{
     GNASH_REPORT_FUNCTION;
 
-    struct stat stats;
+    //struct stat stats;
+    // TODO: should we use the 'netfd' passed as parameter instead ?
     return open(filespec, _netfd, _statistics);
 }
 
@@ -255,7 +257,7 @@
         }
     }
 
-    int blocksize = 8192;
+    //int blocksize = 8192;
     int nbytes = 0;
     Network net;
 //    while ((_seekptr - _dataptr) >= 0) {
@@ -277,7 +279,7 @@
 
 // Stream a preview, instead of the full movie.
 bool
-Stream::preview(const char *filespec, int frames) {
+Stream::preview(const char* /*filespec*/, int /*frames*/) {
     GNASH_REPORT_FUNCTION;
 
     _state = PREVIEW;
@@ -286,7 +288,7 @@
 
 // Stream a series of thumbnails
 bool
-Stream::thumbnail(const char *filespec, int quantity) {
+Stream::thumbnail(const char* /*filespec*/, int /*quantity*/) {
     GNASH_REPORT_FUNCTION;
     
     _state = THUMBNAIL;
@@ -295,7 +297,7 @@
 
 // Pause the stream
 bool
-Stream::pause(int frame) {
+Stream::pause(int /*frame*/) {
     GNASH_REPORT_FUNCTION;
     
     _state = PAUSE;
@@ -304,7 +306,7 @@
 
 // Seek within the stream
 bool
-Stream::seek(int frame) {
+Stream::seek(int /*frame*/) {
     GNASH_REPORT_FUNCTION;
     
     _state = SEEK;
@@ -313,7 +315,7 @@
 
 // Upload a stream into a sandbox
 bool
-Stream::upload(const char *filespec) {
+Stream::upload(const char* /*filespec*/) {
     GNASH_REPORT_FUNCTION;
     
     _state = UPLOAD;
@@ -321,7 +323,7 @@
 }
 
 // Stream a single "real-time" source.
-bool Stream::multicast(const char *filespec) {
+bool Stream::multicast(const char* /*filespec*/) {
     GNASH_REPORT_FUNCTION;
     
     _state = MULTICAST;

Index: libbase/network.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/network.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- libbase/network.cpp 18 Apr 2007 14:07:33 -0000      1.24
+++ libbase/network.cpp 27 Apr 2007 07:49:36 -0000      1.25
@@ -620,7 +620,7 @@
 
 // Write to the connection
 int
-Network::writeNet(std::string buffer)
+Network::writeNet(const std::string& buffer)
 {
     return writeNet(buffer.c_str(), buffer.size());
 }

Index: libbase/network.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/network.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- libbase/network.h   8 Apr 2007 23:06:17 -0000       1.15
+++ libbase/network.h   27 Apr 2007 07:49:36 -0000      1.16
@@ -82,7 +82,7 @@
     int readNet(int fd, char *buffer, int nbytes, int timeout);
     
     // Write to the connection
-    int writeNet(std::string buffer);
+    int writeNet(const std::string& buffer);
     int writeNet(char const *buffer);
     int writeNet(char const *buffer, int nbytes);
     int writeNet(const unsigned char *buffer, int nbytes);




reply via email to

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