[PATCH 3/4] initialize nsPluginInstance

Peter Hatina phatina at redhat.com
Mon Apr 2 03:14:59 PDT 2012


---
 SpiceXPI/src/plugin/plugin.cpp |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index 25a098b..2274b63 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -185,15 +185,20 @@ void NS_DestroyPluginInstance(nsPluginInstanceBase
*aPlugin)
 nsPluginInstance::nsPluginInstance(NPP aInstance):
     nsPluginInstanceBase(),
     m_pid_controller(-1),
+    m_connected_status(-2),
     m_instance(aInstance),
-    m_initialized(PR_FALSE),
+    m_initialized(PR_TRUE),
+    m_window(NULL),
+    m_fullscreen(PR_FALSE),
+    m_smartcard(PR_FALSE),
+    m_admin_console(PR_FALSE),
+    m_no_taskmgr_execution(PR_FALSE),
+    m_send_ctrlaltdel(PR_TRUE),
     m_scriptable_peer(NULL)
 {
     // create temporary directory in /tmp
     char tmp_dir[] = "/tmp/spicec-XXXXXX";
     m_tmp_dir = mkdtemp(tmp_dir);
-
-    m_connected_status = -2;
 }

 nsPluginInstance::~nsPluginInstance()
@@ -225,6 +230,9 @@ NPBool nsPluginInstance::init(NPWindow *aWindow)
     m_dynamic_menu.clear();
     m_number_of_monitors.clear();
     m_guest_host_name.clear();
+    m_hot_keys.clear();
+    m_language.clear();
+    m_trust_store_file.clear();

     m_fullscreen = PR_FALSE;
     m_smartcard = PR_FALSE;
-- 
1.7.7.6

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



More information about the Spice-devel mailing list