From: bjordanov Date: Mon, 7 Mar 2005 11:52:06 +0000 (+0000) Subject: When defined USE_ITHREADS and called perl_xlat an perl interpetator is not X-Git-Tag: release_2_0_0_pre1~1642 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=f8fe8095414a0ec55e68fcba0558ec5f20edbed1;p=freeradius.git When defined USE_ITHREADS and called perl_xlat an perl interpetator is not released on exit so after few requests the thread pool will not contain a free interpetators. (closes: #179) --- diff --git a/src/modules/rlm_perl/rlm_perl.c b/src/modules/rlm_perl/rlm_perl.c index 9f8c7b2..df09798 100644 --- a/src/modules/rlm_perl/rlm_perl.c +++ b/src/modules/rlm_perl/rlm_perl.c @@ -647,7 +647,7 @@ static int perl_xlat(void *instance, REQUEST *request, char *fmt, char * out, PERL_INST *inst= (PERL_INST *) instance; PerlInterpreter *perl; char params[1024], *tmp_ptr, *ptr, *tmp; - int count, ret; + int count, ret=0; STRLEN n_a; #ifndef USE_ITHREADS perl = inst->perl; @@ -711,14 +711,12 @@ static int perl_xlat(void *instance, REQUEST *request, char *fmt, char * out, FREETMPS ; LEAVE ; - if (ret <= freespace) - return ret; } } #ifdef USE_ITHREADS pool_release(handle, instance); #endif - return 0; + return ret; } /* * Do any per-module initialization that is separate to each