harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r547780 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
Date Fri, 15 Jun 2007 20:45:52 GMT
Author: tellison
Date: Fri Jun 15 13:45:51 2007
New Revision: 547780

URL: http://svn.apache.org/viewvc?view=rev&rev=547780
Log:
Apply patch HARMONY-4068 ([classlib][luni] Jetty scenario fails on DRLVM with access violation
exception)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c?view=diff&rev=547780&r1=547779&r2=547780
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c Fri
Jun 15 13:45:51 2007
@@ -383,6 +383,7 @@
   jmethodID errorCodeExConstructor, socketExConstructor,socketExCauseMethod;
   jobject errorCodeEx,socketEx;
   char *errorMessage = netLookupErrorString (env, errorNumber);
+  jstring errorMessageString = (*env)->NewStringUTF (env,errorMessage);
   if (HYPORT_ERROR_SOCKET_WOULDBLOCK == errorNumber){
   	   errorCodeExClass = (*env)->FindClass (env, "org/apache/harmony/luni/util/ErrorCodeException");
   	   if (!errorCodeExClass){
@@ -401,7 +402,7 @@
        if (!socketExConstructor) {
                return;
        }
-       socketEx = (*env)->NewObject(env, socketExClass,errorCodeExConstructor,errorMessage);

+       socketEx = (*env)->NewObject(env, socketExClass,errorCodeExConstructor,errorMessageString);

        socketExCauseMethod = (*env)->GetMethodID(env,socketExClass,"initCause","(Ljava/lang/Throwable;)Ljava/lang/Throwable;");
        (*env)->CallObjectMethod(env,socketEx,socketExCauseMethod,errorCodeEx);
        (*env)->Throw(env,socketEx);



Mime
View raw message