nacho       02/05/28 17:13:00

  Modified:    jk/native2/server/apache2 mod_jk2.c
  Log:
  * Getting soName for mod_jk2, now it's possible to log to native win32 logger from 
apache
  
  Revision  Changes    Path
  1.26      +28 -1     jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c
  
  Index: mod_jk2.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mod_jk2.c 22 May 2002 23:44:23 -0000      1.25
  +++ mod_jk2.c 29 May 2002 00:13:00 -0000      1.26
  @@ -59,7 +59,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
    *                 Henri Gomez <[EMAIL PROTECTED]>                               *
  - * Version:     $Revision: 1.25 $                                           *
  + * Version:     $Revision: 1.26 $                                           *
    ***************************************************************************/
   
   /*
  @@ -82,6 +82,10 @@
   
   #include "util_script.h"
   
  +#ifdef WIN32
  +static char  file_name[_MAX_PATH];
  +#endif
  +
   /*
    * Jakarta (jk_) include files
    */
  @@ -284,6 +288,17 @@
       
       env->l=l;
       
  +#ifdef WIN32
  +    env->soName=env->globalPool->calloc(env, env->globalPool, strlen(file_name)+1);
  +    
  +    if( env->soName == NULL ){
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR, "Error creating env->soName\n");
  +        return env;
  +    }
  +    strcpy(env->soName,file_name);
  +#else 
  +    env->soName=NULL;
  +#endif
       /* We should make it relative to JK_HOME or absolute path.
          ap_server_root_relative(cmd->pool,opt); */
       
  @@ -708,3 +723,15 @@
       jk2_register_hooks     /* register hooks */
   };
   
  +#ifdef WIN32
  +
  +BOOL WINAPI DllMain(HINSTANCE hInst,        // Instance Handle of the DLL
  +                    ULONG ulReason,         // Reason why NT called this DLL
  +                    LPVOID lpReserved)      // Reserved parameter for future use
  +{
  +    GetModuleFileName( hInst, file_name, sizeof(file_name)));
  +    return TRUE;
  +}
  +
  +
  +#endif
  \ No newline at end of file
  
  
  

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

Reply via email to