Better rewrite it like :
if (remote_sa->next) env->l->jkLog(env, env->l, JK_LOG_DEBUG, "channelApr.open(): error %d creating socket %d %s\n", ret, socketInfo->host); else env->l->jkLog(env, env->l, JK_LOG_ERROR, "channelApr.open(): error %d creating socket %d %s\n", ret, socketInfo->host);
Such a patch is attached.
Thanks for your response,
Jeff
Index: common/jk_channel_apr_socket.c
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v
retrieving revision 1.29
diff -u -r1.29 jk_channel_apr_socket.c
--- common/jk_channel_apr_socket.c 4 Feb 2003 07:39:59 -0000 1.29
+++ common/jk_channel_apr_socket.c 21 Mar 2003 13:38:14 -0000
@@ -226,9 +226,16 @@
if ((ret = apr_socket_create(&sock, remote_sa->family, SOCK_STREAM,
(apr_pool_t *)env->globalPool->_private))
!= APR_SUCCESS) {
- env->l->jkLog(env, env->l, remote_sa->next ? JK_LOG_DEBUG : JK_LOG_ERROR,
- "channelApr.open(): error %d creating socket %d %s\n",
- ret, socketInfo->host);
+ if (remote_sa->next) {
+ env->l->jkLog(env, env->l, JK_LOG_DEBUG,
+ "channelApr.open(): error %d creating socket %d %s\n",
+ ret, socketInfo->host);
+ }
+ else {
+ env->l->jkLog(env, env->l, JK_LOG_ERROR,
+ "channelApr.open(): error %d creating socket %d %s\n",
+ ret, socketInfo->host);
+ }
remote_sa = remote_sa->next;
continue;
}
@@ -255,11 +262,20 @@
/* if an error occurred, loop round and try again */
if (ret != APR_SUCCESS) {
apr_socket_close(sock);
- env->l->jkLog(env, env->l, remote_sa->next ? JK_LOG_DEBUG : JK_LOG_ERROR,
- "channelApr.open() attempt to connect to %pI (%s) failed
%d\n",
- remote_sa,
- socketInfo->host,
- ret);
+ if (remote_sa->next) {
+ env->l->jkLog(env, env->l, JK_LOG_DEBUG,
+ "channelApr.open() attempt to connect to %pI (%s)
failed %d\n",
+ remote_sa,
+ socketInfo->host,
+ ret);
+ }
+ else {
+ env->l->jkLog(env, env->l, JK_LOG_ERROR,
+ "channelApr.open() attempt to connect to %pI (%s)
failed %d\n",
+ remote_sa,
+ socketInfo->host,
+ ret);
+ }
remote_sa = remote_sa->next;
continue;
}--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
