From d378d7973217961a8615258d97cbb7d537ba756c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Thu, 18 Jan 2007 12:50:24 +0000 Subject: [PATCH] merge with 3.0 branch (merge_30_31_src2 - merge_30_31_src3) --- org.glite.lb.server-bones/src/srvbones.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/org.glite.lb.server-bones/src/srvbones.c b/org.glite.lb.server-bones/src/srvbones.c index cdac73e..fdb7ef0 100644 --- a/org.glite.lb.server-bones/src/srvbones.c +++ b/org.glite.lb.server-bones/src/srvbones.c @@ -472,6 +472,8 @@ static int slave(slave_data_init_hnd data_init_hnd, int sock) if ( newconn >= 0 ) { + int ret; + conn = newconn; srv = newsrv; gettimeofday(&client_start, NULL); @@ -506,12 +508,13 @@ static int slave(slave_data_init_hnd data_init_hnd, int sock) to = set_connect_to; if ( services[srv].on_new_conn_hnd - && services[srv].on_new_conn_hnd(conn, to.tv_sec >= 0 ? &to : NULL, clnt_data) ) + && (ret = services[srv].on_new_conn_hnd(conn, to.tv_sec >= 0 ? &to : NULL, clnt_data)) ) { - dprintf(("[%d] Connection not estabilished.\n", getpid())); - if ( !debug ) syslog(LOG_ERR, "Connection not estabilished.\n"); + dprintf(("[%d] Connection not estabilished, err = %d.\n", getpid(),ret)); + if ( !debug ) syslog(LOG_ERR, "Connection not estabilished, err = %d.\n",ret); close(conn); conn = srv = -1; + if (ret < 0) exit(1); continue; } gettimeofday(&client_done, NULL); -- 1.8.2.3