diff options
author | Andreas Schneider <asn@samba.org> | 2011-03-14 14:49:51 +0100 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-03-23 17:19:22 +0100 |
commit | 661ac49794a0594003463e1cf3ae1bf806f24213 (patch) | |
tree | 871c35cea120846ef922f64be665b1d2fd35c9f6 /source3/rpc_server/epmapper | |
parent | da718a5961c3404435f9bc64bebabb71b53455eb (diff) | |
download | samba-661ac49794a0594003463e1cf3ae1bf806f24213.tar.gz samba-661ac49794a0594003463e1cf3ae1bf806f24213.tar.bz2 samba-661ac49794a0594003463e1cf3ae1bf806f24213.zip |
s3-epmapper: Added a cleanup function.
Diffstat (limited to 'source3/rpc_server/epmapper')
-rw-r--r-- | source3/rpc_server/epmapper/srv_epmapper.c | 13 | ||||
-rw-r--r-- | source3/rpc_server/epmapper/srv_epmapper.h | 32 |
2 files changed, 45 insertions, 0 deletions
diff --git a/source3/rpc_server/epmapper/srv_epmapper.c b/source3/rpc_server/epmapper/srv_epmapper.c index f0bd9c63f5..c43e351fdb 100644 --- a/source3/rpc_server/epmapper/srv_epmapper.c +++ b/source3/rpc_server/epmapper/srv_epmapper.c @@ -23,6 +23,7 @@ #include "../libcli/security/security.h" #include "librpc/gen_ndr/ndr_epmapper.h" #include "librpc/gen_ndr/srv_epmapper.h" +#include "srv_epmapper.h" typedef uint32_t error_status_t; @@ -219,6 +220,18 @@ static bool is_priviledged_pipe(struct auth_serversupplied_info *info) { return true; } +void srv_epmapper_cleanup(void) +{ + struct dcesrv_endpoint *ep; + + for (ep = endpoint_table; + ep != NULL; + ep = endpoint_table) { + DLIST_REMOVE(endpoint_table, ep); + TALLOC_FREE(ep); + } +} + /* * epm_Insert * diff --git a/source3/rpc_server/epmapper/srv_epmapper.h b/source3/rpc_server/epmapper/srv_epmapper.h new file mode 100644 index 0000000000..642117beab --- /dev/null +++ b/source3/rpc_server/epmapper/srv_epmapper.h @@ -0,0 +1,32 @@ +/* + * Unix SMB/CIFS implementation. + * + * Endpoint server for the epmapper pipe + * + * Copyright (C) 2010-2011 Andreas Schneider <asn@samba.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _SRV_EPMAPPER_H_ +#define _SRV_EPMAPPER_H_ + +/** + * @brief Cleanup memory and other stuff. + */ +void srv_epmapper_cleanup(void); + +#endif /*_SRV_EPMAPPER_H_ */ + +/* vim: set ts=8 sw=8 noet cindent syntax=c.doxygen: */ |