Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2008-09-01 09:20:05 +0000
committerTomasz Zarna2008-09-01 09:20:05 +0000
commit1e61bc87c49c33631321294b5311d61c961aae41 (patch)
treee8861ba9344def9004c820fe6cdc31ecdb7930a9 /bundles/org.eclipse.core.net/natives/unix
parent3c61001a3a514488f4bdb6839f76ffd8a94d9770 (diff)
downloadeclipse.platform.team-1e61bc87c49c33631321294b5311d61c961aae41.tar.gz
eclipse.platform.team-1e61bc87c49c33631321294b5311d61c961aae41.tar.xz
eclipse.platform.team-1e61bc87c49c33631321294b5311d61c961aae41.zip
bug 232495: [Proxy] Gnome library should not blow up Eclipse w/o Gnome
Diffstat (limited to 'bundles/org.eclipse.core.net/natives/unix')
-rw-r--r--bundles/org.eclipse.core.net/natives/unix/getproxygnome.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.core.net/natives/unix/getproxygnome.c b/bundles/org.eclipse.core.net/natives/unix/getproxygnome.c
index 1444fb34c..1811952bf 100644
--- a/bundles/org.eclipse.core.net/natives/unix/getproxygnome.c
+++ b/bundles/org.eclipse.core.net/natives/unix/getproxygnome.c
@@ -7,6 +7,7 @@
*
* Contributors:
* Oakland Software Incorporated - initial API and implementation
+ * IBM Corporation - enabling JNI calls for gconfInit method (bug 232495)
*/
#include <jni.h>
@@ -36,7 +37,9 @@ static jmethodID passwordMethod;
#define CHECK_NULL(X) { if ((X) == NULL) fprintf (stderr,"JNI error at line %d\n", __LINE__); }
-static void gconfInit(JNIEnv *env) {
+JNIEXPORT void JNICALL Java_org_eclipse_core_internal_net_proxy_unix_UnixProxyProvider_gconfInit(
+ JNIEnv *env, jclass clazz) {
+
client = gconf_client_get_default();
jclass cls= NULL;
CHECK_NULL(cls = (*env)->FindClass(env, "org/eclipse/core/internal/net/ProxyData"));
@@ -73,7 +76,7 @@ JNIEXPORT jobject JNICALL Java_org_eclipse_core_internal_net_proxy_unix_UnixProx
jobject proxyInfo= NULL;
if (client == NULL) {
- gconfInit(env);
+ Java_org_eclipse_core_internal_net_proxy_unix_UnixProxyProvider_gconfInit(env, clazz);
}
CHECK_NULL(proxyInfo = (*env)->NewObject(env, proxyInfoClass, proxyInfoConstructor, protocol));
@@ -183,7 +186,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_eclipse_core_internal_net_proxy_unix_Uni
JNIEnv *env, jclass clazz) {
if (client == NULL) {
- gconfInit(env);
+ Java_org_eclipse_core_internal_net_proxy_unix_UnixProxyProvider_gconfInit(env, clazz);
}
GSList *npHosts;

Back to the top