Initial release, version 0.0.0.
[gsasl.git] / lib / xfinish.c
blob7040eebdf2c4a18a3a901bae5d5f17595a65ba39
1 /* xfinish.c finish libgsasl session
2 * Copyright (C) 2002 Simon Josefsson
4 * This file is part of libgsasl.
6 * Libgsasl is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * Libgsasl is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with libgsasl; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "internal.h"
24 /**
25 * gsasl_client_finish:
26 * @xctx: libgsasl client handle.
28 * Destroy a libgsasl client handle. The handle must not be used with
29 * other libgsasl functions after this call.
30 **/
31 void
32 gsasl_client_finish (Gsasl_session_ctx *xctx)
34 xctx->mech->client.finish (xctx, xctx->mech_data);
36 free(xctx);
39 /**
40 * gsasl_server_finish:
41 * @xctx: libgsasl server handle.
43 * Destroy a libgsasl server handle. The handle must not be used with
44 * other libgsasl functions after this call.
45 **/
46 void
47 gsasl_server_finish (Gsasl_session_ctx *xctx)
49 xctx->mech->server.finish (xctx, xctx->mech_data);
51 free(xctx);