summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2012-02-08 16:55:40 +0100
committerDavid Disseldorp <ddiss@samba.org>2012-06-26 16:10:39 +0200
commit2f85c1fcf268e447303990e48b49b149020320d0 (patch)
treef3f2f457352dc5ba56fed82e4db70302e77acc44 /source3/include
parente1ddf8f0e41643933c2aa58dc9421cbc7631e2e5 (diff)
downloadsamba-2f85c1fcf268e447303990e48b49b149020320d0.tar.gz
samba-2f85c1fcf268e447303990e48b49b149020320d0.tar.bz2
samba-2f85c1fcf268e447303990e48b49b149020320d0.zip
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.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/printing.h4
1 files changed, 3 insertions, 1 deletions
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);