summaryrefslogtreecommitdiff
path: root/source3/smbwrapper/smbw.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-04 10:14:21 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-04 10:14:21 +0000
commita1b002fcbe5daa91ce8bc94b73760e2428238315 (patch)
tree005af724097b775b4b277b20590446eb91af7c7d /source3/smbwrapper/smbw.c
parent6760e69a68571e01ee57b959193a56278962a23c (diff)
downloadsamba-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.c10
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;
}