From 81931b0ae49518a3ac277f5c494fde5f01ded805 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20=C5=A0kr=C3=A1bal?= Date: Tue, 8 Mar 2005 14:52:54 +0000 Subject: [PATCH] - fixed double context freing All the "on disconnect" must be in server-bones on_disconnect_hnd handler function. --- org.glite.lb.server/src/bkserverd.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) 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; } -- 1.8.2.3