[libinline-java-perl] 181/398: Made the shared function safer when not in shared mode.
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit d11eea9321362ef6ddd29d87ea3322a675b5f9a5
Author: patrick_leb <>
Date: Sun Feb 10 21:14:36 2002 +0000
Made the shared function safer when not in shared mode.
---
Java/JVM.pm | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/Java/JVM.pm b/Java/JVM.pm
index 16d0bb9..2d562b2 100644
--- a/Java/JVM.pm
+++ b/Java/JVM.pm
@@ -51,14 +51,12 @@ sub new {
my $debug = (Inline::Java::get_DEBUG() ? "true" : "false") ;
- my $shared_jvm = ($o->get_java_config('SHARED_JVM') ? "true" : "false") ;
- my $port = $o->get_java_config('PORT') ;
-
- $this->{port} = $port ;
+ $this->{shared} = $o->get_java_config('SHARED_JVM') ;
+ $this->{port} = $o->get_java_config('PORT') ;
$this->{host} = "localhost" ;
# Check if JVM is already running
- if ($shared_jvm eq "true"){
+ if ($this->{shared}){
eval {
$this->reconnect() ;
} ;
@@ -72,7 +70,8 @@ sub new {
my $java = File::Spec->catfile($o->get_java_config('BIN'),
"java" . Inline::Java::portable("EXE_EXTENSION")) ;
- my $cmd = "\"$java\" InlineJavaServer $debug $this->{port} $shared_jvm" ;
+ my $shared_arg = ($this->{shared} ? "true" : "false") ;
+ my $cmd = "\"$java\" InlineJavaServer $debug $this->{port} $shared_arg" ;
Inline::Java::debug($cmd) ;
if ($o->get_config('UNTAINT')){
@@ -295,7 +294,7 @@ sub setup_socket {
sub reconnect {
my $this = shift ;
- if ($this->{JNI}){
+ if (($this->{JNI})||(! $this->{shared})){
return ;
}
@@ -321,7 +320,7 @@ sub reconnect {
sub capture {
my $this = shift ;
- if ($this->{JNI}){
+ if (($this->{JNI})||(! $this->{shared})){
return ;
}
@@ -345,7 +344,7 @@ sub am_owner {
sub release {
my $this = shift ;
- if ($this->{JNI}){
+ if (($this->{JNI})||(! $this->{shared})){
return ;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list