From 7d7ca1762786823730d4162cfe1c37bbe58d6b4d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 4 Mar 2012 20:43:12 +0000 Subject: [PATCH] Race condition during context initializations. --- org.glite.lb.client/src/connection.c | 2 +- org.glite.lb.common/src/context.c | 17 ++++++++--------- org.glite.lb.common/src/param.c | 4 ++++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/org.glite.lb.client/src/connection.c b/org.glite.lb.client/src/connection.c index 2b56382..0418e26 100644 --- a/org.glite.lb.client/src/connection.c +++ b/org.glite.lb.client/src/connection.c @@ -716,7 +716,7 @@ int edg_wll_accept(edg_wll_Context ctx, int fd) } #ifdef EDG_WLL_CONNPOOL_DEBUG - printf("Connection with fd %d accepted. %d in the pool\n",>srvName,ctx->srvPort,ctx->connNotif->connToUse); + printf("Connection with fd %d accepted. %d in the pool\n",ctx->srvName,ctx->srvPort,ctx->connNotif->connToUse); #endif diff --git a/org.glite.lb.common/src/context.c b/org.glite.lb.common/src/context.c index c522e97..97f5e55 100644 --- a/org.glite.lb.common/src/context.c +++ b/org.glite.lb.common/src/context.c @@ -53,15 +53,6 @@ int edg_wll_InitContext(edg_wll_Context *ctx) out->allowAnonymous = 1; out->notifSock = -1; - memset(&null, 0, sizeof null); - for (i=0; ip_tmp_timeout.tv_sec = out->p_log_timeout.tv_sec; out->p_tmp_timeout.tv_usec = out->p_log_timeout.tv_usec; @@ -73,6 +64,14 @@ int edg_wll_InitContext(edg_wll_Context *ctx) out->connProxy->conn.sock = -1; // out->connToUse = -1; + memset(&null, 0, sizeof null); + for (i=0; i