From fe72740e8221575921c22030d6d4fcb19201b03b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Jul 2012 15:07:23 +0930 Subject: loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *. They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell --- source3/printing/notify.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/printing/notify.c') diff --git a/source3/printing/notify.c b/source3/printing/notify.c index b6b7ea045e..4040a2bab4 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -423,7 +423,7 @@ void notify_printer_status(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, uint32 status) { - const char *sharename = lp_servicename(snum); + const char *sharename = lp_servicename(talloc_tos(), snum); if (sharename) notify_printer_status_byname(ev, msg_ctx, sharename, status); @@ -511,7 +511,7 @@ void notify_printer_driver(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *driver_name) { - const char *sharename = lp_servicename(snum); + const char *sharename = lp_servicename(talloc_tos(), snum); send_notify_field_buffer( ev, msg_ctx, @@ -523,7 +523,7 @@ void notify_printer_comment(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *comment) { - const char *sharename = lp_servicename(snum); + const char *sharename = lp_servicename(talloc_tos(), snum); send_notify_field_buffer( ev, msg_ctx, @@ -535,7 +535,7 @@ void notify_printer_sharename(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *share_name) { - const char *sharename = lp_servicename(snum); + const char *sharename = lp_servicename(talloc_tos(), snum); send_notify_field_buffer( ev, msg_ctx, @@ -547,7 +547,7 @@ void notify_printer_printername(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *printername) { - const char *sharename = lp_servicename(snum); + const char *sharename = lp_servicename(talloc_tos(), snum); send_notify_field_buffer( ev, msg_ctx, @@ -559,7 +559,7 @@ void notify_printer_port(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *port_name) { - const char *sharename = lp_servicename(snum); + const char *sharename = lp_servicename(talloc_tos(), snum); send_notify_field_buffer( ev, msg_ctx, @@ -571,7 +571,7 @@ void notify_printer_location(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *location) { - const char *sharename = lp_servicename(snum); + const char *sharename = lp_servicename(talloc_tos(), snum); send_notify_field_buffer( ev, msg_ctx, @@ -583,7 +583,7 @@ void notify_printer_sepfile(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *sepfile) { - const char *sharename = lp_servicename(snum); + const char *sharename = lp_servicename(talloc_tos(), snum); send_notify_field_buffer( ev, msg_ctx, -- cgit