summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-05-03 17:02:21 +0200
committerGünther Deschner <gd@samba.org>2010-05-03 17:04:00 +0200
commit4affc58c6a757c379aeb22d0b71cfa06aa926761 (patch)
treefd92025599c310144098b442e0c6a42ae2a5df19 /source3
parente2e39117bcea5264c913383ccc68e23307264c63 (diff)
downloadsamba-4affc58c6a757c379aeb22d0b71cfa06aa926761.tar.gz
samba-4affc58c6a757c379aeb22d0b71cfa06aa926761.tar.bz2
samba-4affc58c6a757c379aeb22d0b71cfa06aa926761.zip
s3-lanman: before trying to call spoolss_ClosePrinter make sure we have a connection.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/lanman.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index ec87dbb0b8..affce70f40 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -936,7 +936,7 @@ static bool api_DosPrintQGetInfo(connection_struct *conn, uint16 vuid,
desc.errcode = ERRbuftoosmall;
out:
- if (is_valid_policy_hnd(&handle)) {
+ if (cli && is_valid_policy_hnd(&handle)) {
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
}
@@ -1133,7 +1133,7 @@ static bool api_DosPrintQEnum(connection_struct *conn, uint16 vuid,
subcntarr[i] = num_jobs;
subcnt += subcntarr[i];
- if (is_valid_policy_hnd(&handle)) {
+ if (cli && is_valid_policy_hnd(&handle)) {
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
}
}
@@ -3128,7 +3128,7 @@ static bool api_RDosPrintJobDel(connection_struct *conn,uint16 vuid,
}
out:
- if (is_valid_policy_hnd(&handle)) {
+ if (cli && is_valid_policy_hnd(&handle)) {
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
}
@@ -3257,7 +3257,7 @@ static bool api_WPrintQueueCtrl(connection_struct *conn,uint16 vuid,
out:
- if (is_valid_policy_hnd(&handle)) {
+ if (cli && is_valid_policy_hnd(&handle)) {
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
}
@@ -3437,7 +3437,7 @@ static bool api_PrintJobInfo(connection_struct *conn, uint16 vuid,
errcode = NERR_Success;
out:
- if (is_valid_policy_hnd(&handle)) {
+ if (cli && is_valid_policy_hnd(&handle)) {
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
}
@@ -4411,7 +4411,7 @@ static bool api_WPrintJobGetInfo(connection_struct *conn, uint16 vuid,
*rdata_len = 0;
}
out:
- if (is_valid_policy_hnd(&handle)) {
+ if (cli && is_valid_policy_hnd(&handle)) {
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
}
@@ -4544,7 +4544,7 @@ static bool api_WPrintJobEnumerate(connection_struct *conn, uint16 vuid,
}
}
out:
- if (is_valid_policy_hnd(&handle)) {
+ if (cli && is_valid_policy_hnd(&handle)) {
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
}
@@ -4742,7 +4742,7 @@ static bool api_WPrintDestGetInfo(connection_struct *conn, uint16 vuid,
}
out:
- if (is_valid_policy_hnd(&handle)) {
+ if (cli && is_valid_policy_hnd(&handle)) {
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
}