summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-28 11:34:08 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-07-28 15:08:42 +0200
commit5fa9fe39ea30c210bfb2ab10cfc796ec4b521f78 (patch)
tree498e56e04da656c3712c724612eb6dc19d4b9976 /source3/printing
parent553124a663379335b401a56e498432d198b3d8e3 (diff)
downloadsamba-5fa9fe39ea30c210bfb2ab10cfc796ec4b521f78.tar.gz
samba-5fa9fe39ea30c210bfb2ab10cfc796ec4b521f78.tar.bz2
samba-5fa9fe39ea30c210bfb2ab10cfc796ec4b521f78.zip
s3-spoolss: Use existing handle in printer_driver_in_use().
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 7d1dd9e4d0..4eb375dddd 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1174,16 +1174,14 @@ WERROR move_driver_to_download_area(struct auth_session_info *session_info,
****************************************************************************/
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
- const struct auth_session_info *session_info,
- struct messaging_context *msg_ctx,
- const struct spoolss_DriverInfo8 *r)
+ struct dcerpc_binding_handle *b,
+ const struct spoolss_DriverInfo8 *r)
{
int snum;
int n_services = lp_numservices();
bool in_use = False;
struct spoolss_PrinterInfo2 *pinfo2 = NULL;
WERROR result;
- struct dcerpc_binding_handle *b = NULL;
if (!r) {
return false;
@@ -1198,16 +1196,6 @@ bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
continue;
}
- if (b == NULL) {
- result = winreg_printer_binding_handle(mem_ctx,
- session_info,
- msg_ctx,
- &b);
- if (!W_ERROR_IS_OK(result)) {
- return false;
- }
- }
-
result = winreg_get_printer(mem_ctx, b,
lp_servicename(snum),
&pinfo2);