You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2003/03/05 00:56:37 UTC

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_un.c

costin      2003/03/04 15:56:37

  Modified:    jk/native2/common jk_channel_un.c
  Log:
  Added few visible attributes to channel_un
  
  I still get some ocasional errors - can't reproduce it consistently, but
  it happened twice in the last 3 days.
  
  Revision  Changes    Path
  1.16      +27 -1     jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c
  
  Index: jk_channel_un.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- jk_channel_un.c	4 Feb 2003 07:39:59 -0000	1.15
  +++ jk_channel_un.c	4 Mar 2003 23:56:37 -0000	1.16
  @@ -103,8 +103,10 @@
                                             jk_endpoint_t *endpoint);
   
   static char *jk2_channel_un_multiValueInfo[]={"group",  NULL };
  -static char *jk2_channel_un_setAttributeInfo[]={"file", "route", "lb_factor",
  +static char *jk2_channel_un_setAttributeInfo[]={"file", "soLinger", "listen", 
                                                   "level", NULL };
  +static char *jk2_channel_un_getAttributeInfo[]={"file", "soLinger", 
  +                                                "listen", NULL };
   
   static int JK_METHOD jk2_channel_un_setAttribute(jk_env_t *env,
                                                   jk_bean_t *mbean, 
  @@ -128,6 +130,24 @@
       return JK_OK;
   }
   
  +static void * JK_METHOD jk2_channel_un_getAttribute(jk_env_t *env,
  +                                                 jk_bean_t *mbean, 
  +                                                 char *name)
  +{
  +    jk_channel_t *ch=(jk_channel_t *)mbean->object;
  +    jk_channel_un_private_t *socketInfo=
  +        (jk_channel_un_private_t *)(ch->_privatePtr);
  +
  +    if( strcmp( "file", name ) == 0 ) {
  +        return socketInfo->file;
  +    } else if( strcmp( "soLinger", name ) == 0 ) {
  +        return jk2_env_itoa( env, socketInfo->l_linger );
  +    } else if( strcmp( "listen", name ) == 0 ) {
  +        return jk2_env_itoa( env, socketInfo->backlog );
  +    } 
  +    return NULL;
  +}
  +
   /** resolve the host IP ( jk_resolve ) and initialize the channel.
    */
   static int JK_METHOD jk2_channel_un_init(jk_env_t *env,
  @@ -139,6 +159,8 @@
       int rc=JK_OK;
       int omask;
   
  +    env->l->jkLog(env, env->l, JK_LOG_INFO,
  +                  "channelUn.init(): init \n" );
       if( socketInfo->file==NULL ) {
           char *localName=ch->mbean->localName;
           jk_config_t *cfg=ch->workerEnv->config;
  @@ -153,6 +175,8 @@
           if (localName[0]=='/') {
               ch->mbean->setAttribute( env, ch->mbean, "file", localName );
           } 
  +        env->l->jkLog(env, env->l, JK_LOG_INFO,
  +                      "channelUn.init(): extracted file from name %s\n", socketInfo->file  );
       }
       
       if (socketInfo->file!=NULL && socketInfo->file[0]=='/') {
  @@ -470,8 +494,10 @@
       ch->serverSide=JK_FALSE;
       
       result->setAttribute= jk2_channel_un_setAttribute; 
  +    result->getAttribute= jk2_channel_un_getAttribute; 
       result->multiValueInfo=jk2_channel_un_multiValueInfo;
       result->setAttributeInfo=jk2_channel_un_setAttributeInfo;
  +    result->getAttributeInfo=jk2_channel_un_getAttributeInfo;
       result->invoke=jk2_channel_invoke;
   
       ch->mbean=result;
  
  
  

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