diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-04 10:14:21 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-04 10:14:21 +0000 |
commit | a1b002fcbe5daa91ce8bc94b73760e2428238315 (patch) | |
tree | 005af724097b775b4b277b20590446eb91af7c7d /source3/smbwrapper/smbw.c | |
parent | 6760e69a68571e01ee57b959193a56278962a23c (diff) | |
download | samba-a1b002fcbe5daa91ce8bc94b73760e2428238315.tar.gz samba-a1b002fcbe5daa91ce8bc94b73760e2428238315.tar.bz2 samba-a1b002fcbe5daa91ce8bc94b73760e2428238315.zip |
add support for unlink() on printer shares in smbwrapper. unlink()
will remove the job from the pirnt queue.
(This used to be commit 7bd738c30a09a211fd14a8544309efeec17c66f5)
Diffstat (limited to 'source3/smbwrapper/smbw.c')
-rw-r--r-- | source3/smbwrapper/smbw.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c index 3a2cbcf5ac..0abe823e29 100644 --- a/source3/smbwrapper/smbw.c +++ b/source3/smbwrapper/smbw.c @@ -756,7 +756,15 @@ int smbw_unlink(const char *fname) goto failed; } - if (!cli_unlink(&srv->cli, path)) { + if (strncmp(srv->cli.dev, "LPT", 3) == 0) { + int job = smbw_stat_printjob(srv, path, NULL, NULL); + if (job == -1) { + goto failed; + } + if (cli_printjob_del(&srv->cli, job) != 0) { + goto failed; + } + } else if (!cli_unlink(&srv->cli, path)) { errno = smbw_errno(&srv->cli); goto failed; } |