Remove another use of global_loadparm.
[kai/samba.git] / source4 / librpc / rpc / dcerpc_util.c
index 32646e85b0e62793789a682c27f81632acb0a42e..ca6a785834b43ff26f0d86ef8f50273c8c9f4bb8 100644 (file)
@@ -671,19 +671,20 @@ _PUBLIC_ NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p,
 
   this triggers on a debug level of >= 10
 */
-_PUBLIC_ void dcerpc_log_packet(const struct ndr_interface_table *ndr,
+_PUBLIC_ void dcerpc_log_packet(const char *lockdir,
+                                                               const struct ndr_interface_table *ndr,
                       uint32_t opnum, uint32_t flags, 
                       DATA_BLOB *pkt)
 {
        const int num_examples = 20;
        int i;
 
-       if (DEBUGLEVEL < 10) return;
+       if (lockdir == NULL) return;
 
        for (i=0;i<num_examples;i++) {
                char *name=NULL;
                asprintf(&name, "%s/rpclog/%s-%u.%d.%s", 
-                        lp_lockdir(global_loadparm), ndr->name, opnum, i,
+                        lockdir, ndr->name, opnum, i,
                         (flags&NDR_IN)?"in":"out");
                if (name == NULL) {
                        return;