summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-05-11 10:52:11 +0200
committerSimo Sorce <idra@samba.org>2010-07-27 10:27:12 -0400
commitc918cfdedec5730b0851fd8132986f26b40a3cdc (patch)
tree78763f838ba8168eb53d731be864bfc1cc1fc1f7 /source3/printing
parentd8ab3e52dc717cbfd82b02c00426e98001acc764 (diff)
downloadsamba-c918cfdedec5730b0851fd8132986f26b40a3cdc.tar.gz
samba-c918cfdedec5730b0851fd8132986f26b40a3cdc.tar.bz2
samba-c918cfdedec5730b0851fd8132986f26b40a3cdc.zip
s3-printing: Removed unsuded c_setprinter functions.
Signed-off-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 3a3b72abbc..aa1e2f7cbd 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -659,72 +659,6 @@ static NTSTATUS driver_unix_convert(connection_struct *conn,
return NT_STATUS_OK;
}
-/*******************************************************************
- tdb traversal function for counting printers.
-********************************************************************/
-
-static int traverse_counting_printers(TDB_CONTEXT *t, TDB_DATA key,
- TDB_DATA data, void *context)
-{
- int *printer_count = (int*)context;
-
- if (memcmp(PRINTERS_PREFIX, key.dptr, sizeof(PRINTERS_PREFIX)-1) == 0) {
- (*printer_count)++;
- DEBUG(10,("traverse_counting_printers: printer = [%s] printer_count = %d\n", key.dptr, *printer_count));
- }
-
- return 0;
-}
-
-/*******************************************************************
- Update the spooler global c_setprinter. This variable is initialized
- when the parent smbd starts with the number of existing printers. It
- is monotonically increased by the current number of printers *after*
- each add or delete printer RPC. Only Microsoft knows why... JRR020119
-********************************************************************/
-
-uint32 update_c_setprinter(bool initialize)
-{
- int32 c_setprinter;
- int32 printer_count = 0;
-
- tdb_lock_bystring(tdb_printers, GLOBAL_C_SETPRINTER);
-
- /* Traverse the tdb, counting the printers */
- tdb_traverse(tdb_printers, traverse_counting_printers, (void *)&printer_count);
-
- /* If initializing, set c_setprinter to current printers count
- * otherwise, bump it by the current printer count
- */
- if (!initialize)
- c_setprinter = tdb_fetch_int32(tdb_printers, GLOBAL_C_SETPRINTER) + printer_count;
- else
- c_setprinter = printer_count;
-
- DEBUG(10,("update_c_setprinter: c_setprinter = %u\n", (unsigned int)c_setprinter));
- tdb_store_int32(tdb_printers, GLOBAL_C_SETPRINTER, c_setprinter);
-
- tdb_unlock_bystring(tdb_printers, GLOBAL_C_SETPRINTER);
-
- return (uint32)c_setprinter;
-}
-
-/*******************************************************************
- Get the spooler global c_setprinter, accounting for initialization.
-********************************************************************/
-
-uint32 get_c_setprinter(void)
-{
- int32 c_setprinter = tdb_fetch_int32(tdb_printers, GLOBAL_C_SETPRINTER);
-
- if (c_setprinter == (int32)-1)
- c_setprinter = update_c_setprinter(True);
-
- DEBUG(10,("get_c_setprinter: c_setprinter = %d\n", c_setprinter));
-
- return (uint32)c_setprinter;
-}
-
/****************************************************************************
Get builtin form struct list.
****************************************************************************/