From 2f85c1fcf268e447303990e48b49b149020320d0 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 8 Feb 2012 16:55:40 +0100 Subject: s3-printing: return talloced print jobs print_job_find() currently returns print jobs to callers via a statically allocated variable, this is particularly messy as the device mode is talloced under the static variable. This change adds or passes a talloc context to all callers, giving them ownership of the returned print job. --- source3/include/printing.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/printing.h b/source3/include/printing.h index 58483cbbfb..86244fbd1a 100644 --- a/source3/include/printing.h +++ b/source3/include/printing.h @@ -195,7 +195,9 @@ bool print_notify_register_pid(int snum); bool print_notify_deregister_pid(int snum); bool print_job_exists(const char* sharename, uint32 jobid); char *print_job_fname(const char* sharename, uint32 jobid); -struct spoolss_DeviceMode *print_job_devmode(const char* sharename, uint32 jobid); +struct spoolss_DeviceMode *print_job_devmode(TALLOC_CTX *mem_ctx, + const char *sharename, + uint32 jobid); bool print_job_set_name(struct tevent_context *ev, struct messaging_context *msg_ctx, const char *sharename, uint32 jobid, const char *name); -- cgit