cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_un.c
hgomez 2004/03/17 08:52:03 Modified:jk/native2/common jk_channel_un.c Log: Remove unused vars (thanks gcc -wall) Revision ChangesPath 1.20 +0 -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.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- jk_channel_un.c 5 Mar 2004 23:35:51 - 1.19 +++ jk_channel_un.c 17 Mar 2004 16:52:03 - 1.20 @@ -224,7 +224,6 @@ jk_channel_t *ch, jk_endpoint_t *endpoint) { -int err; jk_channel_un_private_t *socketInfo= (jk_channel_un_private_t *)(ch-_privatePtr); int unixsock; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_un.c
truk2004/03/05 15:35:52 Modified:jk/native2/common jk_channel_un.c Log: Calculate length for bind() in a portable way that works for sockaddr_un structs with and without sun_len. Revision ChangesPath 1.19 +7 -2 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.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- jk_channel_un.c 24 Feb 2004 08:44:40 - 1.18 +++ jk_channel_un.c 5 Mar 2004 23:35:51 - 1.19 @@ -58,6 +58,12 @@ int listenSocket; } jk_channel_un_private_t; +#ifndef SUN_LEN +/* actual length of an initialized sockaddr_un */ +#define SUN_LEN(su) \ +(sizeof(*(su)) - sizeof((su)-sun_path) + strlen((su)-sun_path)) +#endif + static int JK_METHOD jk2_channel_un_close(jk_env_t *env, jk_channel_t *ch, jk_endpoint_t *endpoint); @@ -162,8 +168,7 @@ rc=bind(socketInfo-listenSocket, (struct sockaddr *) socketInfo-unix_addr, -strlen( socketInfo-unix_addr.sun_path ) + -sizeof( socketInfo-unix_addr.sun_family) ); +SUN_LEN((socketInfo-unix_addr)) ); umask(omask); /* can't fail, so can't clobber errno */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_un.c
This account does not exist - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 ChangesPath 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 - 1.15 +++ jk_channel_un.c 4 Mar 2003 23:56:37 - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_un.c
mturk 2002/07/08 06:41:13 Modified:jk/native2/common jk_channel_un.c Log: no message Revision ChangesPath 1.13 +5 -5 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.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- jk_channel_un.c 10 Jun 2002 21:55:06 - 1.12 +++ jk_channel_un.c 8 Jul 2002 13:41:13 - 1.13 @@ -160,7 +160,7 @@ strcpy(socketInfo-unix_addr.sun_path, socketInfo-file ); if( ch-mbean-debug 0 ) -env-l-jkLog(env, env-l, JK_LOG_INFO, +env-l-jkLog(env, env-l, JK_LOG_DEBUG, channelUn.init(): create AF_UNIX %s\n, socketInfo-file ); } else { env-l-jkLog(env, env-l, JK_LOG_ERROR, channelUn.init(): @@ -263,7 +263,7 @@ } if( ch-mbean-debug 0 ) -env-l-jkLog(env, env-l, JK_LOG_INFO, +env-l-jkLog(env, env-l, JK_LOG_DEBUG, channelUn.open(): create unix socket %s %d\n, socketInfo-file, unixsock ); if (connect(unixsock,(struct sockaddr *)(socketInfo-unix_addr), @@ -277,7 +277,7 @@ } if( ch-mbean-debug 0 ) -env-l-jkLog(env, env-l, JK_LOG_INFO, +env-l-jkLog(env, env-l, JK_LOG_DEBUG, channelUn.open(): connect unix socket %d %s\n, unixsock, socketInfo-file ); /* store the channel information */ endpoint-sd=unixsock; @@ -334,7 +334,7 @@ this_time = write(unixsock, (char *)b + sent , len - sent); if( ch-mbean-debug 0 ) -env-l-jkLog(env, env-l, JK_LOG_INFO, +env-l-jkLog(env, env-l, JK_LOG_DEBUG, channel.apr:send() write() %d %d %s\n, this_time, errno, strerror( errno)); if(0 == this_time) { @@ -436,7 +436,7 @@ } if( ch-mbean-debug 0 ) -env-l-jkLog(env, env-l, JK_LOG_INFO, +env-l-jkLog(env, env-l, JK_LOG_DEBUG, channelUn.receive(): Received len=%d type=%d\n, blen, (int)msg-buf[hlen]); return JK_OK; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_un.c
nacho 02/05/11 18:09:46 Modified:jk/native2/common jk_channel_un.c Log: * Fixed the build on non HAVE_UNIXSOCKETS OSes Revision ChangesPath 1.4 +1 -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.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_channel_un.c 11 May 2002 00:03:53 - 1.3 +++ jk_channel_un.c 12 May 2002 01:09:46 - 1.4 @@ -397,7 +397,7 @@ { env-l-jkLog( env, env-l, JK_LOG_ERROR, channelUn.factory(): Support for unix sockets is disabled, - you need to set HAVE_UNIXSOCKETS at compile time\n, + you need to set HAVE_UNIXSOCKETS at compile time\n); return JK_FALSE; } #endif -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]