rpms/nspluginwrapper/devel nspluginwrapper-0.9.91.5-runtime-restart.patch, 1.1, 1.2 nspluginwrapper.spec, 1.20, 1.21

Martin Stransky (stransky) fedora-extras-commits at redhat.com
Wed Oct 10 10:20:02 UTC 2007


Author: stransky

Update of /cvs/pkgs/rpms/nspluginwrapper/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv717

Modified Files:
	nspluginwrapper-0.9.91.5-runtime-restart.patch 
	nspluginwrapper.spec 
Log Message:
removed possibble deadlock during plugin restart

nspluginwrapper-0.9.91.5-runtime-restart.patch:

Index: nspluginwrapper-0.9.91.5-runtime-restart.patch
===================================================================
RCS file: /cvs/pkgs/rpms/nspluginwrapper/devel/nspluginwrapper-0.9.91.5-runtime-restart.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nspluginwrapper-0.9.91.5-runtime-restart.patch	9 Oct 2007 15:13:00 -0000	1.1
+++ nspluginwrapper-0.9.91.5-runtime-restart.patch	10 Oct 2007 10:19:29 -0000	1.2
@@ -1,6 +1,6 @@
 diff -up nspluginwrapper-0.9.91.5/src/npruntime.c.old nspluginwrapper-0.9.91.5/src/npruntime.c
 --- nspluginwrapper-0.9.91.5/src/npruntime.c.old	2007-08-26 00:39:11.000000000 +0200
-+++ nspluginwrapper-0.9.91.5/src/npruntime.c	2007-10-09 16:58:48.000000000 +0200
++++ nspluginwrapper-0.9.91.5/src/npruntime.c	2007-10-10 09:53:40.000000000 +0200
 @@ -59,6 +59,14 @@ NPClass npclass_bridge = {
    npclass_invoke_RemoveProperty
  };
@@ -194,8 +194,8 @@
 +  g_hash_table_foreach(g_npobjects, npruntime_deactivate_func, NULL);
 +}
 diff -up nspluginwrapper-0.9.91.5/src/rpc.c.old nspluginwrapper-0.9.91.5/src/rpc.c
---- nspluginwrapper-0.9.91.5/src/rpc.c.old	2007-10-09 16:58:48.000000000 +0200
-+++ nspluginwrapper-0.9.91.5/src/rpc.c	2007-10-09 16:58:48.000000000 +0200
+--- nspluginwrapper-0.9.91.5/src/rpc.c.old	2007-10-10 09:53:40.000000000 +0200
++++ nspluginwrapper-0.9.91.5/src/rpc.c	2007-10-10 09:53:40.000000000 +0200
 @@ -298,6 +298,7 @@ struct rpc_connection_t {
    pthread_t server_thread;
    rpc_method_descriptor_t *callbacks;
@@ -266,7 +266,7 @@
  	perror("client socket");
 diff -up nspluginwrapper-0.9.91.5/src/npruntime-impl.h.old nspluginwrapper-0.9.91.5/src/npruntime-impl.h
 --- nspluginwrapper-0.9.91.5/src/npruntime-impl.h.old	2007-03-04 16:01:22.000000000 +0100
-+++ nspluginwrapper-0.9.91.5/src/npruntime-impl.h	2007-10-09 16:58:48.000000000 +0200
++++ nspluginwrapper-0.9.91.5/src/npruntime-impl.h	2007-10-10 09:53:40.000000000 +0200
 @@ -25,6 +25,7 @@
  typedef struct {
    NPObject *npobj;
@@ -284,8 +284,8 @@
 +
  #endif /* NPRUNTIME_IMPL_H */
 diff -up nspluginwrapper-0.9.91.5/src/rpc.h.old nspluginwrapper-0.9.91.5/src/rpc.h
---- nspluginwrapper-0.9.91.5/src/rpc.h.old	2007-10-09 16:58:48.000000000 +0200
-+++ nspluginwrapper-0.9.91.5/src/rpc.h	2007-10-09 16:58:48.000000000 +0200
+--- nspluginwrapper-0.9.91.5/src/rpc.h.old	2007-10-10 09:53:40.000000000 +0200
++++ nspluginwrapper-0.9.91.5/src/rpc.h	2007-10-10 09:53:40.000000000 +0200
 @@ -113,4 +113,10 @@ extern int rpc_method_wait_for_reply(rpc
  extern int rpc_method_get_args(rpc_connection_t *connection, ...) attribute_hidden;
  extern int rpc_method_send_reply(rpc_connection_t *connection, ...) attribute_hidden;
@@ -298,8 +298,8 @@
 +
  #endif /* RPC_H */
 diff -up nspluginwrapper-0.9.91.5/src/npw-wrapper.c.old nspluginwrapper-0.9.91.5/src/npw-wrapper.c
---- nspluginwrapper-0.9.91.5/src/npw-wrapper.c.old	2007-10-09 16:58:48.000000000 +0200
-+++ nspluginwrapper-0.9.91.5/src/npw-wrapper.c	2007-10-09 16:58:48.000000000 +0200
+--- nspluginwrapper-0.9.91.5/src/npw-wrapper.c.old	2007-10-10 09:53:40.000000000 +0200
++++ nspluginwrapper-0.9.91.5/src/npw-wrapper.c	2007-10-10 12:04:29.000000000 +0200
 @@ -107,7 +107,11 @@ typedef struct _StreamInstance {
  // Prototypes
  static void plugin_init(int is_NP_Initialize);
@@ -309,7 +309,7 @@
 +static void plugin_kill(rpc_connection_t *connection);
 +static NPError plugin_start(void);
 +static NPError plugin_start_if_needed(void);
-+
++static int  plugin_killed = 0;
  
  /*
   *  Notes concerning NSPluginWrapper recovery model.
@@ -345,7 +345,7 @@
    g_plugin.initialized = 1 + is_NP_Initialize;
    D(bug("--- INIT ---\n"));
  }
-@@ -2806,17 +2811,28 @@ static void __attribute__((destructor)) 
+@@ -2806,17 +2811,39 @@ static void __attribute__((destructor)) 
    }
  }
  
@@ -354,10 +354,9 @@
  {
    if (g_plugin.is_wrapper)
 -	return NPERR_NO_ERROR;
--
--  // Shut it down    
 +	return;  
-+  
+ 
+-  // Shut it down    
 +  D(bug("plugin_kill, connection %p\n",connection));
 +	
 +  // Kill viewer and plugin
@@ -369,16 +368,27 @@
    g_plugin.is_wrapper = 0;
  
 +  npruntime_deactivate();
++
++  // Set the kill flag
++  plugin_killed = 1;
 +}
 +
 +static NPError plugin_start(void)
 +{
 +  D(bug("plugin_start\n"));
-+	
++
++  if(!plugin_killed) {
++    // Plugin is still active
++    // terminate it before the restart
++    D(bug("plugin_start: plugin_killed = 0!\n"));
++    plugin_kill(g_rpc_connection);
++  }
++  plugin_killed = 0;
++
    // And start it again
    plugin_init(1);
    if (g_plugin.initialized <= 0)
-@@ -2825,7 +2841,7 @@ static NPError plugin_restart(void)
+@@ -2825,7 +2852,7 @@ static NPError plugin_restart(void)
    return invoke_NP_Initialize(npapi_version);
  }
  
@@ -387,7 +397,7 @@
  {
    if (rpc_status(g_rpc_connection) != RPC_STATUS_ACTIVE) {
  	static time_t last_restart = 0;
-@@ -2835,7 +2851,7 @@ static NPError plugin_restart_if_needed(
+@@ -2835,7 +2862,7 @@ static NPError plugin_restart_if_needed(
  	last_restart = now;
  
  	D(bug("Restart plugins viewer\n"));
@@ -396,4 +406,3 @@
  	D(bug(" return: %d [%s]\n", ret, string_of_NPError(ret)));
  	return ret;
    }
-diff -up nspluginwrapper-0.9.91.5/src/npw-viewer.c.old nspluginwrapper-0.9.91.5/src/npw-viewer.c


Index: nspluginwrapper.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nspluginwrapper/devel/nspluginwrapper.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- nspluginwrapper.spec	9 Oct 2007 15:13:00 -0000	1.20
+++ nspluginwrapper.spec	10 Oct 2007 10:19:29 -0000	1.21
@@ -70,7 +70,7 @@
 Summary:	A compatibility layer for Netscape 4 plugins
 Name:		nspluginwrapper
 Version:	0.9.91.5
-Release:	5%{?dist}
+Release:	6%{?dist}
 Source0:	%{name}-%{version}%{?svndate:-%{svndate}}.tar.bz2
 Source1:        %{plugin_config_name}.tar.gz 
 Source2:        plugin-config.sh.in
@@ -229,7 +229,10 @@
 %{_sysconfdir}/sysconfig/%{name}
 
 %changelog
-* Mon Oct 9 2007 Martin Stransky <stransky at redhat.com> 0.9.91.5-5
+* Wed Oct 10 2007 Martin Stransky <stransky at redhat.com> 0.9.91.5-6
+- removed possibble deadlock during plugin restart
+
+* Tue Oct 9 2007 Martin Stransky <stransky at redhat.com> 0.9.91.5-5
 - fixed browser crashes (#290901)
 
 * Mon Oct 1 2007 Martin Stransky <stransky at redhat.com> 0.9.91.5-4




More information about the scm-commits mailing list