CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 08/01/14 14:23:45
Modified files: . : ChangeLog plugin : plugin.cpp Log message: fix perror() usage, check that the pipe is initialized before attempting to write to it. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5391&r2=1.5392 http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.cpp?cvsroot=gnash&r1=1.91&r2=1.92 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5391 retrieving revision 1.5392 diff -u -b -r1.5391 -r1.5392 --- ChangeLog 13 Jan 2008 18:35:25 -0000 1.5391 +++ ChangeLog 14 Jan 2008 14:23:45 -0000 1.5392 @@ -1,3 +1,8 @@ +2008-01-14 Sandro Santilli <[EMAIL PROTECTED]> + + * plugin/plugin.cpp: fix perror() usage, check that the pipe is + initialized before attempting to write to it. + 2008-01-13 Sandro Santilli <[EMAIL PROTECTED]> * libbase/URL.h: reduce string copies (not only in set_querystring). Index: plugin/plugin.cpp =================================================================== RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v retrieving revision 1.91 retrieving revision 1.92 diff -u -b -r1.91 -r1.92 --- plugin/plugin.cpp 7 Jan 2008 09:47:28 -0000 1.91 +++ plugin/plugin.cpp 14 Jan 2008 14:23:45 -0000 1.92 @@ -15,7 +15,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: plugin.cpp,v 1.91 2008/01/07 09:47:28 bwy Exp $ */ +/* $Id: plugin.cpp,v 1.92 2008/01/14 14:23:45 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -283,7 +283,9 @@ _window(0), _width(0), _height(0), - _childpid(0) + _streamfd(-1), + _childpid(0), + _filefd(-1) { for (size_t i=0, n=data->argc; i<n; ++i) { @@ -482,7 +484,7 @@ { if (close(_streamfd) == -1) { - perror(strerror(errno)); + perror("closing _streamfd"); } else { @@ -495,7 +497,7 @@ { if (close(_filefd) == -1) { - perror(strerror(errno)); + perror("closing _filefd"); } else { @@ -514,7 +516,8 @@ #if 0 cout << "Stream for " << stream->url << " is ready" << endl; #endif - return 1024; + if ( _streamfd != -1 ) return 1024; + else return 0; } /// \brief Read the data stream from Mozilla/Firefox @@ -561,7 +564,7 @@ // See if the file actually exists, otherwise we can't spawn it if (stat(procname.c_str(), &procstats) == -1) { - cout << "Invalid filename: " << procname << endl; + cout << "Invalid path to standalone executable: " << procname << endl; return; } @@ -763,7 +766,7 @@ execv(argv[0], const_cast<char**>(argv)); // if execv returns, an error has occurred. - perror(strerror(errno)); + perror("executing standalone gnash"); delete[] argv; _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit