From 90fd5082a2084cf2436105938b47591cce6a9f82 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 12 Mar 2008 00:54:48 +0100 Subject: loadparm: add convenience wrapper lp_kill_all_services() Michael (This used to be commit 32bfd131e33d06be9dfaef02b57f5401d2bc7639) --- source3/param/loadparm.c | 8 ++++++++ source3/web/swat.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index f1bac54251..f02607f875 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -7744,6 +7744,14 @@ void lp_killunused(bool (*snumused) (int)) } } +/** + * Kill all except autoloaded and usershare services - convenience wrapper + */ +void lp_kill_all_services(void) +{ + lp_killunused(NULL); +} + /*************************************************************************** Unload a service. ***************************************************************************/ diff --git a/source3/web/swat.c b/source3/web/swat.c index 2cf0eabeed..bb418db04b 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -475,7 +475,7 @@ static int save_reload(int snum) lp_dump_one(f, False, snum); fclose(f); - lp_killunused(NULL); + lp_kill_all_services(); if (!load_config(False)) { printf(_("Can't reload %s"), get_dyn_CONFIGFILE()); -- cgit