[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] javahl should call 'svn_dso_initialize2' prior to creating any pool.

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: Thu, 07 Aug 2008 19:23:31 +0530

Hi,

I could see javahl not calling 'svn_dso_initialize2' at all.

Attached patch makes it to call 'svn_dso_initialize2'.

With this patch all javahl tests pass.

Would like to get some review from javahl knowledgable folks.

With regards
Kamesh Jayachandran

Index: subversion/bindings/javahl/native/JNIUtil.cpp
===================================================================
--- subversion/bindings/javahl/native/JNIUtil.cpp (revision 32394)
+++ subversion/bindings/javahl/native/JNIUtil.cpp (working copy)
@@ -29,6 +29,7 @@
 
 #include "svn_pools.h"
 #include "svn_wc.h"
+#include "svn_dso.h"
 #include "svn_path.h"
 #include <apr_file_info.h>
 #include "svn_private_config.h"
@@ -99,6 +100,7 @@
 {
   // This method has to be run only once during the run a program.
   static bool run = false;
+ svn_error_t *err;
   if (run) // already run
     return true;
 
@@ -166,6 +168,16 @@
       return FALSE;
     }
 
+ /* This has to happen before any pools are created. */
+ if ((err = svn_dso_initialize2()))
+ {
+ if (stderr && err->message)
+ fprintf(stderr, "%s", err->message);
+
+ svn_error_clear(err);
+ return FALSE;
+ }
+
   if (0 > atexit(apr_terminate))
     {
       if (stderr)
@@ -228,7 +240,7 @@
      ### the libsvn_wc library, which basically means SVNClient. */
   if (getenv ("SVN_ASP_DOT_NET_HACK"))
     {
- svn_error_t *err = svn_wc_set_adm_dir("_svn", g_pool);
+ err = svn_wc_set_adm_dir("_svn", g_pool);
       if (err)
         {
           if (stderr)

Make javahl to call 'svn_dso_initialize2' before creating any pool.

* subversion/bindings/javahl/native/JNIUtil.cpp
  (): include "svn_dso.h"
  (JNIUtil::JNIGlobalInit):
   Call 'svn_dso_initialize2' before creating any pool.

Received on 2008-08-07 15:54:38 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.