cvs commit: jakarta-tomcat-connectors/jni/native/src pool.c proc.c

2005-05-31 Thread mturk
mturk   2005/05/31 23:34:23

  Modified:jni/native/src pool.c proc.c
  Log:
  Use method id array for callback handler
  
  Revision  ChangesPath
  1.7   +5 -5  jakarta-tomcat-connectors/jni/native/src/pool.c
  
  Index: pool.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/pool.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- pool.c28 May 2005 07:48:29 -  1.6
  +++ pool.c1 Jun 2005 06:34:23 -   1.7
  @@ -32,7 +32,7 @@
   
   if (data) {
   if (!TCN_IS_NULL(cb->env, cb->obj)) {
  -rv = (*(cb->env))->CallIntMethod(cb->env, cb->obj, cb->mid,
  +rv = (*(cb->env))->CallIntMethod(cb->env, cb->obj, cb->mid[0],
NULL);
   TCN_UNLOAD_CLASS(cb->env, cb->obj);
   }
  @@ -115,9 +115,9 @@
  return 0;
   }
   cls = (*e)->GetObjectClass(e, obj);
  -cb->env = e;
  -cb->obj = (*e)->NewGlobalRef(e, obj);
  -cb->mid = (*e)->GetMethodID(e, cls, "callback", "()I");
  +cb->env= e;
  +cb->obj= (*e)->NewGlobalRef(e, obj);
  +cb->mid[0] = (*e)->GetMethodID(e, cls, "callback", "()I");
   
   apr_pool_cleanup_register(p, (const void *)cb,
 generic_pool_cleanup,
  
  
  
  1.4   +5 -5  jakarta-tomcat-connectors/jni/native/src/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/proc.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- proc.c24 May 2005 09:24:40 -  1.3
  +++ proc.c1 Jun 2005 06:34:23 -   1.4
  @@ -39,7 +39,7 @@
   cb = (tcn_callback_t *)data;
   if (cb) {
   if (!TCN_IS_NULL(cb->env, cb->obj)) {
  -(*(cb->env))->CallVoidMethod(cb->env, cb->obj, cb->mid,
  +(*(cb->env))->CallVoidMethod(cb->env, cb->obj, cb->mid[0],
   P2J(pool), (jint)err,
   (*(cb->env))->NewStringUTF(cb->env, 
description),
   NULL);
  @@ -373,9 +373,9 @@
  return;
   }
   cls = (*e)->GetObjectClass(e, obj);
  -cb->env = e;
  -cb->obj = (*e)->NewGlobalRef(e, obj);
  -cb->mid = (*e)->GetMethodID(e, cls, "callback", 
"(JILjava/lang/String;)V");
  +cb->env= e;
  +cb->obj= (*e)->NewGlobalRef(e, obj);
  +cb->mid[0] = (*e)->GetMethodID(e, cls, "callback", 
"(JILjava/lang/String;)V");
   
   apr_pool_userdata_setn(cb, ERRFN_USERDATA_KEY, child_errfn_pool_cleanup, 
p);
   apr_procattr_child_errfn_set(a, generic_child_errfn);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jni/native/src pool.c

2005-05-27 Thread mturk
mturk   2005/05/27 09:38:09

  Modified:jni/native/src pool.c
  Log:
  Make sure our global pool is accessor for all the pools.
  
  Revision  ChangesPath
  1.5   +7 -2  jakarta-tomcat-connectors/jni/native/src/pool.c
  
  Index: pool.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/pool.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- pool.c24 May 2005 09:24:40 -  1.4
  +++ pool.c27 May 2005 16:38:09 -  1.5
  @@ -18,11 +18,13 @@
* @author Mladen Turk
* @version $Revision$, $Date$
*/
  - 
  +
   #include "apr.h"
   #include "apr_pools.h"
   #include "tcn.h"
   
  +extern apr_pool_t *tcn_global_pool;
  +
   static apr_status_t generic_pool_cleanup(void *data)
   {
   apr_status_t rv = APR_SUCCESS;
  @@ -45,6 +47,9 @@
   apr_pool_t *n;
   
   UNREFERENCED(o);
  +/* Make sure our global pool is accessor for all pools */
  +if (p == NULL)
  +p = tcn_global_pool;
   TCN_THROW_IF_ERR(apr_pool_create(&n, p), n);
   cleanup:
   return P2J(n);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



'Case=931-208'cvs commit: jakarta-tomcat-connectors/jni/native/src pool.c shm.c

2005-02-03 Thread Community Care


Thank you for writing to Baazee.com. This is to acknowledge that we have 
received your email and we expect to give you a positive response in the next 
48 hours. 

At times it may take more than 48 hours, however you can be assured that we are 
working to give you the response at the earliest.

This is an acknowledgement and hence request not to reply to this email.

Thanking you, 

Baazee Community Care
-
The information in this email is confidential and may be legally privileged. It 
is intended solely for the addressee. Access to this email by anyone else is 
unauthorised. If you are not the intended recipient, any disclosure, copying, 
distribution or any action taken or omitted to be taken in reliance on it, is 
prohibited and may be unlawful. In such case, you should destroy this message 
and kindly notify the sender by reply email. Baazee sends e-mails using the 
domain baazee.com (@baazee.com) and hence any mails received from any other 
e-mail id except the one mentioned above and stating information about Baazee 
policies and procedures should be ignored and immediately brought to the 
attention of the Baazee team. Opinions, conclusions and other information in 
this message that do not relate to the official business of Baazee.com shall be 
understood as neither given by the Company nor endorsed by it. 



cvs commit: jakarta-tomcat-connectors/jni/native/src pool.c shm.c

2005-02-02 Thread mturk
mturk   2005/02/02 23:48:20

  Modified:jni/native/src pool.c shm.c
  Log:
  Add NIO ByteBuffer direct memory allocation.
  
  Revision  ChangesPath
  1.2   +30 -0 jakarta-tomcat-connectors/jni/native/src/pool.c
  
  Index: pool.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/pool.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- pool.c14 Jan 2005 13:47:58 -  1.1
  +++ pool.c3 Feb 2005 07:48:20 -   1.2
  @@ -123,3 +123,33 @@
   (*e)->DeleteGlobalRef(e, cb->obj);
   free(cb);
   }
  +

  +TCN_IMPLEMENT_CALL(jobject, Pool, alloc)(TCN_STDARGS, jlong pool,

  + jint size)

  +{

  +apr_pool_t *p = J2P(pool, apr_pool_t *);

  +apr_size_t sz = (apr_size_t)size;

  +void *mem;

  +

  +UNREFERENCED(o);

  +

  +if ((mem = apr_palloc(p, sz)) != NULL)

  +return (*e)->NewDirectByteBuffer(e, mem, (jlong)sz);

  +else

  +return NULL;

  +}

  +

  +TCN_IMPLEMENT_CALL(jobject, Pool, calloc)(TCN_STDARGS, jlong pool,

  +  jint size)

  +{

  +apr_pool_t *p = J2P(pool, apr_pool_t *);

  +apr_size_t sz = (apr_size_t)size;

  +void *mem;

  +

  +UNREFERENCED(o);

  +

  +if ((mem = apr_pcalloc(p, sz)) != NULL)

  +return (*e)->NewDirectByteBuffer(e, mem, (jlong)sz);

  +else

  +return NULL;

  +}

  
  
  
  1.2   +14 -0 jakarta-tomcat-connectors/jni/native/src/shm.c
  
  Index: shm.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/shm.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- shm.c 14 Jan 2005 13:47:58 -  1.1
  +++ shm.c 3 Feb 2005 07:48:20 -   1.2
  @@ -108,3 +108,17 @@
   UNREFERENCED_STDARGS;
   return (jlong)apr_shm_size_get(s);
   }
  +

  +TCN_IMPLEMENT_CALL(jobject, Shm, buffer)(TCN_STDARGS, jlong shm)

  +{

  +apr_shm_t *s = J2P(shm, apr_shm_t *);

  +jlong sz = (jlong)apr_shm_size_get(s);

  +void *a;

  +

  +UNREFERENCED(o);

  +

  +if ((a = apr_shm_baseaddr_get(s)) != NULL)

  +return (*e)->NewDirectByteBuffer(e, a, sz);

  +else

  +return NULL;

  +}

  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]