tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_uriMap.c
Date Wed, 02 Oct 2002 10:28:36 GMT
mturk       2002/10/02 03:28:36

  Modified:    jk/native2/common jk_uriMap.c
  Log:
  When creating 'free' webapps, put them to the correct vhost
  changing to the real name composed of the host[:port]/context.
  
  Revision  Changes    Path
  1.47      +12 -5     jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c
  
  Index: jk_uriMap.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- jk_uriMap.c	2 Oct 2002 09:49:16 -0000	1.46
  +++ jk_uriMap.c	2 Oct 2002 10:28:36 -0000	1.47
  @@ -415,16 +415,23 @@
                                         strlen(context));
           /* if not alredy created, create it */
           if (ctxEnv == NULL) {
  -           jk_bean_t *mbean;
  - 
  +            jk_bean_t *mbean;
  +            char *ctxname;
  +
  +            ctxname = uriEnv->pool->calloc(env, uriEnv->pool, strlen(vhost) +

  +                                           strlen(context) + 1 );
  +
  +            strcpy(ctxname, vhost);
  +            strcat(ctxname, context);
  +
               env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                          "uriMap: creating context %s\n", context);
  +                          "uriMap: creating context %s\n", ctxname);
               mbean = env->getBean2(env, "uri", context);
               if (mbean == NULL)
  -                mbean = env->createBean2(env, uriMap->pool,"uri", context);
  +                mbean = env->createBean2(env, uriMap->pool,"uri", ctxname);
               if (mbean == NULL || mbean->object == NULL) {
                   env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                              "uriMap: can't create context object %s\n",context);
  +                              "uriMap: can't create context object %s\n",ctxname);
                   continue;
               }
               ctxEnv = mbean->object;
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message