From: Jiří Škrábal Date: Tue, 8 Mar 2005 14:52:54 +0000 (+0000) Subject: - fixed double context freing X-Git-Tag: glite-deployment-lb_R_1_1_1~9 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=81931b0ae49518a3ac277f5c494fde5f01ded805;p=jra1mw.git - fixed double context freing All the "on disconnect" must be in server-bones on_disconnect_hnd handler function. --- diff --git a/org.glite.lb.server/src/bkserverd.c b/org.glite.lb.server/src/bkserverd.c index 85883b8..0aa86e2 100644 --- a/org.glite.lb.server/src/bkserverd.c +++ b/org.glite.lb.server/src/bkserverd.c @@ -969,9 +969,6 @@ int bk_accept_store(int conn, struct timeval *timeout, void *cdata) /* fallthrough */ case ENOTCONN: - edg_wll_gss_close(&ctx->connPool[ctx->connToUse].gss, NULL); - edg_wll_FreeContext(ctx); - ctx = NULL; free(errt); free(errd); dprintf(("[%d] Connection closed\n", getpid())); /* @@ -1039,9 +1036,6 @@ int bk_accept_serve(int conn, struct timeval *timeout, void *cdata) /* fallthrough */ case ENOTCONN: - edg_wll_gss_close(&ctx->connPool[ctx->connToUse].gss, NULL); - edg_wll_FreeContext(ctx); - ctx = NULL; free(errt); free(errd); dprintf(("[%d] Connection closed\n", getpid())); /* @@ -1159,12 +1153,9 @@ int bk_clnt_disconnect(int conn, struct timeval *timeout, void *cdata) if ( ctx->connPool[ctx->connToUse].gss.context != GSS_C_NO_CONTEXT) - { - struct timeval to = { 0, CLNT_REJECT_TIMEOUT }; - - edg_wll_gss_close(&ctx->connPool[ctx->connToUse].gss, &to); - } + edg_wll_gss_close(&ctx->connPool[ctx->connToUse].gss, timeout); edg_wll_FreeContext(ctx); + ctx = NULL; return 0; }