[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-289-g8be3911 |
Date: |
Fri, 18 Mar 2011 03:29:51 +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 8be39112887c704fb36f69a5a1896285760c4e06 (commit)
from 3cbc8bb3e1aa10b8a39a0a89c76ad12cff02130f (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=8be39112887c704fb36f69a5a1896285760c4e06
commit 8be39112887c704fb36f69a5a1896285760c4e06
Author: Bastiaan Jacques <address@hidden>
Date: Fri Mar 18 04:11:35 2011 +0100
Another attempt to prevent the plugin from blocking Firefox, seeing as
the previous solution did not work on OpenBSD (at least).
This approach reads only a single byte at a time, and subsequently
checks that more input is flagged before attempting the next read.
This is tested to prevent blocking at least on OpenBSD and Fedora
with Firefox 3.x and 4.0rc1.
diff --git a/plugin/npapi/plugin.cpp b/plugin/npapi/plugin.cpp
index 8b05178..b961dae 100644
--- a/plugin/npapi/plugin.cpp
+++ b/plugin/npapi/plugin.cpp
@@ -678,22 +678,13 @@ nsPluginInstance::handlePlayerRequests(GIOChannel*
iochan, GIOCondition cond)
assert(cond & G_IO_IN);
- assert(g_io_channel_get_flags(iochan) & G_IO_FLAG_NONBLOCK);
-
gnash::log_debug("Checking player requests on FD #%d",
g_io_channel_unix_get_fd(iochan));
- int retries = 5;
- const size_t buf_size = 512;
+ const size_t buf_size = 1;
gchar buffer[buf_size];
do {
- if (retries-- <= 0) {
- gnash::log_debug("Too many reads necessary to get all the data
from"
- " the Gnash socket. Will try to get the rest
later.");
- break;
- }
-
GError* error = 0;
gsize bytes_read = 0;
@@ -1290,19 +1281,6 @@ nsPluginInstance::setupIOChannel(int fd, GIOFunc
handler, GIOCondition signals)
GIOChannel* ichan = g_io_channel_unix_new(fd);
g_io_channel_set_close_on_unref(ichan, true);
- GError* error = 0;
- GIOStatus rv = g_io_channel_set_flags(ichan, G_IO_FLAG_NONBLOCK,
- &error);
- if (error || rv != G_IO_STATUS_NORMAL) {
- log_error("Could not make player communication nonblocking.");
-
- g_io_channel_unref(ichan);
- if (error) {
- g_error_free(error);
- }
- return;
- }
-
gnash::log_debug("New IO Channel for fd #%d",
g_io_channel_unix_get_fd(ichan));
g_io_add_watch(ichan, signals, handler, (gpointer)this);
-----------------------------------------------------------------------
Summary of changes:
plugin/npapi/plugin.cpp | 24 +-----------------------
1 files changed, 1 insertions(+), 23 deletions(-)
hooks/post-receive
--
Gnash
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-289-g8be3911,
Bastiaan Jacques <=