diff options
-rw-r--r-- | source3/include/nt_printing.h | 40 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 44 |
2 files changed, 44 insertions, 40 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index f56ddcbf67..52b11fe762 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -162,46 +162,6 @@ typedef struct { #define SPLHND_PORTMON_TCP 3 #define SPLHND_PORTMON_LOCAL 4 -/* structure to store the printer handles */ -/* and a reference to what it's pointing to */ -/* and the notify info asked about */ -/* that's the central struct */ -typedef struct _Printer{ - struct _Printer *prev, *next; - bool document_started; - bool page_started; - uint32 jobid; /* jobid in printing backend */ - int printer_type; - fstring servername; - fstring sharename; - uint32 type; - uint32 access_granted; - struct { - uint32 flags; - uint32 options; - fstring localmachine; - uint32 printerlocal; - struct spoolss_NotifyOption *option; - struct policy_handle client_hnd; - bool client_connected; - uint32 change; - /* are we in a FindNextPrinterChangeNotify() call? */ - bool fnpcn; - struct messaging_context *msg_ctx; - } notify; - struct { - fstring machine; - fstring user; - } client; - - /* devmode sent in the OpenPrinter() call */ - struct spoolss_DeviceMode *devmode; - - /* TODO cache the printer info2 structure */ - struct spoolss_PrinterInfo2 *info2; - -} Printer_entry; - /* * The printer attributes. * I #defined all of them (grabbed form MSDN) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 181868d186..99f2ca1a24 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -57,6 +57,50 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV +#ifndef MAX_OPEN_PRINTER_EXS +#define MAX_OPEN_PRINTER_EXS 50 +#endif + +/* structure to store the printer handles */ +/* and a reference to what it's pointing to */ +/* and the notify info asked about */ +/* that's the central struct */ +typedef struct _Printer{ + struct _Printer *prev, *next; + bool document_started; + bool page_started; + uint32 jobid; /* jobid in printing backend */ + int printer_type; + fstring servername; + fstring sharename; + uint32 type; + uint32 access_granted; + struct { + uint32 flags; + uint32 options; + fstring localmachine; + uint32 printerlocal; + struct spoolss_NotifyOption *option; + struct policy_handle client_hnd; + bool client_connected; + uint32 change; + /* are we in a FindNextPrinterChangeNotify() call? */ + bool fnpcn; + struct messaging_context *msg_ctx; + } notify; + struct { + fstring machine; + fstring user; + } client; + + /* devmode sent in the OpenPrinter() call */ + struct spoolss_DeviceMode *devmode; + + /* TODO cache the printer info2 structure */ + struct spoolss_PrinterInfo2 *info2; + +} Printer_entry; + static Printer_entry *printers_list; struct printer_session_counter { |