diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 15:07:23 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 15:07:23 +0930 |
commit | fe72740e8221575921c22030d6d4fcb19201b03b (patch) | |
tree | 0b1bb254e23d6541eede8f2ff4494af477fd5566 /source3/printing/print_generic.c | |
parent | c809eec53fb1d2a36909e4934dff349f91e3359e (diff) | |
download | samba-fe72740e8221575921c22030d6d4fcb19201b03b.tar.gz samba-fe72740e8221575921c22030d6d4fcb19201b03b.tar.xz samba-fe72740e8221575921c22030d6d4fcb19201b03b.zip |
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 <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/printing/print_generic.c')
-rw-r--r-- | source3/printing/print_generic.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source3/printing/print_generic.c b/source3/printing/print_generic.c index 8f557376d7..efe910d7b4 100644 --- a/source3/printing/print_generic.c +++ b/source3/printing/print_generic.c @@ -73,7 +73,7 @@ static int print_run_command(int snum, const char* printername, bool do_sub, if (do_sub && snum != -1) { syscmd = talloc_sub_advanced(ctx, - lp_servicename(snum), + lp_servicename(talloc_tos(), snum), current_user_info.unix_name, "", current_user.ut.gid, @@ -117,8 +117,8 @@ static int generic_job_pause(int snum, struct printjob *pjob) /* need to pause the spooled entry */ slprintf(jobstr, sizeof(jobstr)-1, "%d", pjob->sysjob); - return print_run_command(snum, lp_printername(snum), True, - lp_lppausecommand(snum), NULL, + return print_run_command(snum, lp_printername(talloc_tos(), snum), True, + lp_lppausecommand(talloc_tos(), snum), NULL, "%j", jobstr, NULL); } @@ -132,8 +132,8 @@ static int generic_job_resume(int snum, struct printjob *pjob) /* need to pause the spooled entry */ slprintf(jobstr, sizeof(jobstr)-1, "%d", pjob->sysjob); - return print_run_command(snum, lp_printername(snum), True, - lp_lpresumecommand(snum), NULL, + return print_run_command(snum, lp_printername(talloc_tos(), snum), True, + lp_lpresumecommand(talloc_tos(), snum), NULL, "%j", jobstr, NULL); } @@ -254,8 +254,8 @@ static int generic_job_submit(int snum, struct printjob *pjob, slprintf(job_size, sizeof(job_size)-1, "%lu", (unsigned long)pjob->size); /* send it to the system spooler */ - ret = print_run_command(snum, lp_printername(snum), True, - lp_printcommand(snum), NULL, + ret = print_run_command(snum, lp_printername(talloc_tos(), snum), True, + lp_printcommand(talloc_tos(), snum), NULL, "%s", p, "%J", jobname, "%f", p, @@ -272,8 +272,8 @@ static int generic_job_submit(int snum, struct printjob *pjob, * determine the backend job identifier (sysjob). */ pjob->sysjob = -1; - ret = generic_queue_get(lp_printername(snum), printing_type, lpq_cmd, - &q, &status); + ret = generic_queue_get(lp_printername(talloc_tos(), snum), + printing_type, lpq_cmd, &q, &status); if (ret > 0) { int i; for (i = 0; i < ret; i++) { @@ -307,8 +307,8 @@ static int generic_job_submit(int snum, struct printjob *pjob, ****************************************************************************/ static int generic_queue_pause(int snum) { - return print_run_command(snum, lp_printername(snum), True, - lp_queuepausecommand(snum), NULL, NULL); + return print_run_command(snum, lp_printername(talloc_tos(), snum), True, + lp_queuepausecommand(talloc_tos(), snum), NULL, NULL); } /**************************************************************************** @@ -316,8 +316,8 @@ static int generic_queue_pause(int snum) ****************************************************************************/ static int generic_queue_resume(int snum) { - return print_run_command(snum, lp_printername(snum), True, - lp_queueresumecommand(snum), NULL, NULL); + return print_run_command(snum, lp_printername(talloc_tos(), snum), True, + lp_queueresumecommand(talloc_tos(), snum), NULL, NULL); } /**************************************************************************** |