/hg/release/icedtea-web-1.1: RH586194: Unable to connect to conn...

dbhole at icedtea.classpath.org dbhole at icedtea.classpath.org
Wed Dec 21 14:34:37 PST 2011


changeset cdd0bbf399e8 in /hg/release/icedtea-web-1.1
details: http://icedtea.classpath.org/hg/release/icedtea-web-1.1?cmd=changeset;node=cdd0bbf399e8
author: Deepak Bhole <dbhole at redhat.com>
date: Wed Dec 21 17:29:45 2011 -0500

	RH586194: Unable to connect to connect with Juniper VPN client

	Patch from Thomas Meyer <thomas at m3y3r.de>

	 * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc(sendMember):
	Use createJavaObjectFromVariant to create the resulting object on
	Java side, rather than always creating a JSObject.


diffstat:

 AUTHORS                                           |   1 +
 ChangeLog                                         |   7 +++
 NEWS                                              |   2 +
 plugin/icedteanp/IcedTeaPluginRequestProcessor.cc |  51 ++--------------------
 4 files changed, 15 insertions(+), 46 deletions(-)

diffs (117 lines):

diff -r 88e6e058cdf3 -r cdd0bbf399e8 AUTHORS
--- a/AUTHORS	Wed Dec 21 12:33:06 2011 +0100
+++ b/AUTHORS	Wed Dec 21 17:29:45 2011 -0500
@@ -13,6 +13,7 @@
 DJ Lucas <dj at lucasit.com>
 Omair Majid <omajid at redhat.com>
 Jon A. Maxwell <jmaxwell at users.sourceforge.net>
+Thomas Meyer <thomas at m3y3r.de>
 Andrew Su <asu at redhat.com>
 Joshua Sumali <jsumali at redhat.com>
 Mark Wielaard <mark at klomp.org>
diff -r 88e6e058cdf3 -r cdd0bbf399e8 ChangeLog
--- a/ChangeLog	Wed Dec 21 12:33:06 2011 +0100
+++ b/ChangeLog	Wed Dec 21 17:29:45 2011 -0500
@@ -1,3 +1,10 @@
+2011-12-21  Thomas Meyer <thomas at m3y3r.de>
+
+	RH586194: Unable to connect to connect with Juniper VPN client
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc(sendMember): Use
+	createJavaObjectFromVariant to create the resulting object on Java side,
+	rather than always creating a JSObject.
+
 2011-12-21  Jiri Vanek  <jvanek at redhat.com>
 
 	*Makefile.am:
diff -r 88e6e058cdf3 -r cdd0bbf399e8 NEWS
--- a/NEWS	Wed Dec 21 12:33:06 2011 +0100
+++ b/NEWS	Wed Dec 21 17:29:45 2011 -0500
@@ -9,6 +9,8 @@
 CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
 
 New in release 1.1.5 (2011-XX-XX):
+* Plugin
+  - RH586194: Unable to connect to connect with Juniper VPN client
 
 New in release 1.1.4 (2011-11-08):
 * Security updates:
diff -r 88e6e058cdf3 -r cdd0bbf399e8 plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
--- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc	Wed Dec 21 12:33:06 2011 +0100
+++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc	Wed Dec 21 17:29:45 2011 -0500
@@ -490,12 +490,12 @@
     JavaRequestProcessor java_request = JavaRequestProcessor();
     JavaResultData* java_result;
     NPVariant* parent_ptr;
+    NPVariant* member_ptr;
 
     //int reference;
     std::string member_id = std::string();
-    std::string jsObjectClassID = std::string();
-    std::string jsObjectConstructorID = std::string();
     std::string response = std::string();
+    std::string result_id = std::string();
 
     NPIdentifier member_identifier;
 
@@ -551,50 +551,9 @@
 
     PLUGIN_DEBUG("Member PTR after internal request: %s\n", thread_data.result.c_str());
 
-    java_result = java_request.findClass(0, "netscape.javascript.JSObject");
+    member_ptr = (NPVariant*) IcedTeaPluginUtilities::stringToJSID(thread_data.result);
 
-    // the result we want is in result_string (assuming there was no error)
-    if (java_result->error_occurred)
-    {
-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
-        //goto cleanup;
-    }
-
-    jsObjectClassID.append(*(java_result->return_string));
-
-    args = std::vector<std::string>();
-    std::string longArg = "J";
-    args.push_back(longArg);
-
-    java_result = java_request.getMethodID(jsObjectClassID,
-                                           browser_functions.getstringidentifier("<init>"),
-                                           args);
-
-    // the result we want is in result_string (assuming there was no error)
-    if (java_result->error_occurred)
-    {
-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
-        //goto cleanup;
-    }
-
-    jsObjectConstructorID.append(*(java_result->return_string));
-
-    // We have the method id. Now create a new object.
-
-    args.clear();
-    args.push_back(thread_data.result);
-    java_result = java_request.newObjectWithConstructor("",
-                                         jsObjectClassID,
-                                         jsObjectConstructorID,
-                                         args);
-
-    // the result we want is in result_string (assuming there was no error)
-    if (java_result->error_occurred)
-    {
-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
-        //goto cleanup;
-    }
-
+    createJavaObjectFromVariant(instance, *member_ptr, &result_id);
 
     IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
     if (*(message_parts->at(2)) == "GetSlot")
@@ -603,7 +562,7 @@
     } else {
         response.append(" JavaScriptGetSlot ");
     }
-    response.append(java_result->return_string->c_str());
+    response.append(result_id.c_str());
     plugin_to_java_bus->post(response.c_str());
 }
 



More information about the distro-pkg-dev mailing list