From b172112393d4e834f266875610aeb43d0a6a7de9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 14 Apr 2005 08:46:53 +0000 Subject: [PATCH] Fixed build under GCC 3.4: removed label on the end of the block. --- org.glite.lb.server-bones/src/srvbones.c | 72 ++++++++++++++++---------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/org.glite.lb.server-bones/src/srvbones.c b/org.glite.lb.server-bones/src/srvbones.c index 54800e6..2eae919 100644 --- a/org.glite.lb.server-bones/src/srvbones.c +++ b/org.glite.lb.server-bones/src/srvbones.c @@ -378,46 +378,46 @@ static int slave(slave_data_init_hnd data_init_hnd, int sock) if ( !services[srv].on_request_hnd ) { kick_client = 3; - goto kick; - } - - to = set_request_to; - if ((rv = services[srv].on_request_hnd(conn,to.tv_sec>=0 ? &to : NULL,clnt_data)) == ENOTCONN) { - if (services[srv].on_disconnect_hnd - && (rv = services[srv].on_disconnect_hnd(conn,NULL,clnt_data))) - { - dprintf(("[%d] disconnect handler: %s, terminating\n",getpid(),strerror(rv))); + } else { + + to = set_request_to; + if ((rv = services[srv].on_request_hnd(conn,to.tv_sec>=0 ? &to : NULL,clnt_data)) == ENOTCONN) { + if (services[srv].on_disconnect_hnd + && (rv = services[srv].on_disconnect_hnd(conn,NULL,clnt_data))) + { + dprintf(("[%d] disconnect handler: %s, terminating\n",getpid(),strerror(rv))); + exit(1); + } + close(conn); + conn = -1; + srv = -1; + dprintf(("[%d] Connection closed\n", getpid())); + } + else if (rv > 0) { + /* non-fatal error -> close connection and contiue + * XXX: likely to leak resources but can we call on_disconnect_hnd() on error? + */ + close(conn); + conn = -1; + srv = -1; + dprintf(("[%d] %s, connection closed\n",getpid(),strerror(rv))); + continue; + } + else if ( rv < 0 ) { + /* unknown error -> clasified as FATAL -> kill slave + */ + dprintf(("[%d] %s, terminating\n",getpid(),strerror(-rv))); exit(1); } - close(conn); - conn = -1; - srv = -1; - dprintf(("[%d] Connection closed\n", getpid())); - } - else if (rv > 0) { - /* non-fatal error -> close connection and contiue - * XXX: likely to leak resources but can we call on_disconnect_hnd() on error? - */ - close(conn); - conn = -1; - srv = -1; - dprintf(("[%d] %s, connection closed\n",getpid(),strerror(rv))); + else { + dprintf(("[%d] request done\n", getpid())); + gettimeofday(&client_done, NULL); + } + + first_request = 0; continue; - } - else if ( rv < 0 ) { - /* unknown error -> clasified as FATAL -> kill slave - */ - dprintf(("[%d] %s, terminating\n",getpid(),strerror(-rv))); - exit(1); - } - else { - dprintf(("[%d] request done\n", getpid())); - gettimeofday(&client_done, NULL); - } - first_request = 0; - continue; - kick: + } } if ( !first_request && FD_ISSET(sock, &fds) && conn_cnt < set_slave_conns_max ) -- 1.8.2.3