summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-02-12 19:16:14 +0000
committerGerald Carter <jerry@samba.org>2002-02-12 19:16:14 +0000
commit51e205c92acce4d9374cc6b9e5ae234219037626 (patch)
tree1af7e6f3bd9594d7011bfb7ac4e1a07436025533 /source3
parent6a92f246ca312a25fb453a022bd1f40279cb57b7 (diff)
downloadsamba-51e205c92acce4d9374cc6b9e5ae234219037626.tar.gz
samba-51e205c92acce4d9374cc6b9e5ae234219037626.tar.bz2
samba-51e205c92acce4d9374cc6b9e5ae234219037626.zip
merge from 2.2
(This used to be commit 09fc979172327d6396642e824f6d482c6f986850)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index f76b78f116..1be11f6a18 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4422,6 +4422,8 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
return True;
}
+#if 0 /* JERRY */
+
/* Return true if two devicemodes are equal */
#define DEVMODE_CHECK_INT(field) \
@@ -4431,6 +4433,10 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
return False; \
}
+/************************************************************************
+ Handy, but currently unused functions
+ ***********************************************************************/
+
static BOOL nt_devicemode_equal(NT_DEVICEMODE *d1, NT_DEVICEMODE *d2)
{
if (!d1 && !d2) goto equal; /* if both are NULL they are equal */
@@ -4662,6 +4668,8 @@ static BOOL nt_printer_info_level_equal(NT_PRINTER_INFO_LEVEL *p1,
return True;
}
+#endif
+
/********************************************************************
* Called by spoolss_api_setprinter
* when updating a printer description.
@@ -4735,9 +4743,13 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
goto done;
}
- /* NT likes to call this function even though nothing has actually
- changed. Check this so the user doesn't end up with an
- annoying permission denied dialog box. */
+#if 0 /* JERRY */
+
+ /*
+ * Another one of those historical misunderstandings...
+ * This is reminisent of a similar call we had in _spoolss_setprinterdata()
+ * I'm leaving it here as a reminder. --jerry
+ */
if (nt_printer_info_level_equal(printer, old_printer)) {
DEBUG(3, ("update_printer: printer info has not changed\n"));
@@ -4745,6 +4757,8 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
goto done;
}
+#endif
+
/* Check calling user has permission to update printer description */
if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) {
@@ -4784,7 +4798,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
* lookup previously saved driver initialization info, which is then
* bound to the printer, simulating what happens in the Windows arch.
*/
- if (strequal(printer->info_2->drivername, old_printer->info_2->drivername))
+ if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername))
set_driver_init(printer, 2);
}