gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-244-ge4e1f99
Date: Sun, 10 Apr 2011 16:24:08 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  e4e1f99753ff2c112a068747add5c57a31c74be1 (commit)
      from  b3af6993cedceabd13935b9678d4cd956f371da2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=e4e1f99753ff2c112a068747add5c57a31c74be1


commit e4e1f99753ff2c112a068747add5c57a31c74be1
Author: Bastiaan Jacques <address@hidden>
Date:   Sun Apr 10 18:23:37 2011 +0200

    Return an error to the browser if there's a problem launching the Gnash 
process, so we don't block in write().

diff --git a/plugin/npapi/plugin.cpp b/plugin/npapi/plugin.cpp
index d758695..edd90fe 100644
--- a/plugin/npapi/plugin.cpp
+++ b/plugin/npapi/plugin.cpp
@@ -566,7 +566,7 @@ nsPluginInstance::SetWindow(NPWindow* aWindow)
     // When testing the interface to the plugin, don't start the player
     // as a debug client "nc -l 1111" is used instead.
     if (!_childpid && !_swf_url.empty()) {
-        startProc();
+        return startProc();
     }
 
     return NPERR_NO_ERROR;
@@ -616,7 +616,7 @@ nsPluginInstance::NewStream(NPMIMEType /*type*/, NPStream* 
stream,
     _swf_url = stream->url;
 
     if (!_swf_url.empty() && _window) {
-        startProc();
+        return startProc();
     }
 
     return NPERR_NO_ERROR;
@@ -1288,7 +1288,7 @@ nsPluginInstance::setupIOChannel(int fd, GIOFunc handler, 
GIOCondition signals)
 }
 
 
-void
+NPError
 nsPluginInstance::startProc()
 {
 
@@ -1299,20 +1299,20 @@ nsPluginInstance::startProc()
     int ret = socketpair(AF_UNIX, SOCK_STREAM, 0, p2c_pipe);
     if (ret == -1) {
         gnash::log_error("socketpair(p2c) failed: %s", strerror(errno));
-        return;
+        return NPERR_GENERIC_ERROR;
     }
     _streamfd = p2c_pipe[1];
 
     ret = socketpair(AF_UNIX, SOCK_STREAM, 0, c2p_pipe);
     if (ret == -1) {
         gnash::log_error("socketpair(c2p) failed: %s", strerror(errno));
-        return;
+        return NPERR_GENERIC_ERROR;
     }
 
     ret = socketpair(AF_UNIX, SOCK_STREAM, 0, p2c_controlpipe);
     if (ret == -1) {
         gnash::log_error("socketpair(control) failed: %s", strerror(errno));
-        return;
+        return NPERR_GENERIC_ERROR;
     }
 
     _scriptObject->setControlFD(p2c_controlpipe[1]);
@@ -1325,7 +1325,7 @@ nsPluginInstance::startProc()
 
     if (arg_vec.empty()) {
         gnash::log_error("Failed to obtain command line parameters.");
-        return;
+        return NPERR_GENERIC_ERROR;
     }
     
     std::vector<const char*> args;
@@ -1341,7 +1341,7 @@ nsPluginInstance::startProc()
     // If the fork failed, childpid is -1. So print out an error message.
     if (_childpid == -1) {
         gnash::log_error("dup2() failed: %s", strerror(errno));
-        return;
+        return NPERR_OUT_OF_MEMORY_ERROR;
     }
     
     // If we are the parent and fork() worked, childpid is a positive integer.
@@ -1372,7 +1372,7 @@ nsPluginInstance::startProc()
         
         setupIOChannel(p2c_controlpipe[1], remove_handler, G_IO_HUP);
 
-        return;
+        return NPERR_NO_ERROR;
     }
     
     // This is the child scope.
diff --git a/plugin/npapi/plugin.h b/plugin/npapi/plugin.h
index b3f12ff..3a5ef94 100644
--- a/plugin/npapi/plugin.h
+++ b/plugin/npapi/plugin.h
@@ -89,7 +89,7 @@ public:
     GnashPluginScriptObject *getScriptObject() { return _scriptObject; }; // 
FIXME: debug only!!!
 
 private:
-    void startProc();
+    NPError startProc();
     std::vector<std::string> getCmdLine(int hostfd, int controlfd);
 
     void setupCookies(const std::string& pageURL);

-----------------------------------------------------------------------

Summary of changes:
 plugin/npapi/plugin.cpp |   18 +++++++++---------
 plugin/npapi/plugin.h   |    2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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