From 2f5ca872a80ad872ab864061f0c6982d8605393f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 Dec 2007 16:54:34 +0100 Subject: r26313: Fix more uses of static loadparm. (This used to be commit 6fd0d9d3b75546d08c24c513e05b1843d5777608) --- source4/nbt_server/wins/wins_hook.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source4/nbt_server/wins/wins_hook.c') diff --git a/source4/nbt_server/wins/wins_hook.c b/source4/nbt_server/wins/wins_hook.c index 768f9477f6..ae832774a3 100644 --- a/source4/nbt_server/wins/wins_hook.c +++ b/source4/nbt_server/wins/wins_hook.c @@ -38,15 +38,14 @@ static const char *wins_hook_action_string(enum wins_hook_action action) } void wins_hook(struct winsdb_handle *h, const struct winsdb_record *rec, - enum wins_hook_action action) + enum wins_hook_action action, const char *wins_hook_script) { - const char *script = lp_wins_hook(global_loadparm); uint32_t i, length; int child; char *cmd = NULL; TALLOC_CTX *tmp_mem = NULL; - if (!script || !script[0]) return; + if (!wins_hook_script || !wins_hook_script[0]) return; tmp_mem = talloc_new(h); if (!tmp_mem) goto failed; @@ -59,7 +58,7 @@ void wins_hook(struct winsdb_handle *h, const struct winsdb_record *rec, cmd = talloc_asprintf(tmp_mem, "%s %s %s %02x %ld", - script, + wins_hook_script, wins_hook_action_string(action), rec->name->name, rec->name->type, @@ -92,5 +91,5 @@ void wins_hook(struct winsdb_handle *h, const struct winsdb_record *rec, return; failed: talloc_free(tmp_mem); - DEBUG(0,("FAILED: calling wins hook '%s'\n", script)); + DEBUG(0,("FAILED: calling wins hook '%s'\n", wins_hook_script)); } -- cgit