diff options
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 5c40052295..0fb38b84db 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -84,8 +84,8 @@ static ubi_dlList counter_list; static struct cli_state cli; static uint32 smb_connections=0; -#define OPEN_HANDLE(pnum) ((pnum!=NULL) && (pnum->open!=False) && (IVAL(pnum->printer_hnd.data,16)==(uint32)sys_getpid())) -#define OUR_HANDLE(pnum) ((pnum==NULL)?"NULL":(IVAL(pnum->data,16)==sys_getpid()?"OURS":"OTHER")) +#define OPEN_HANDLE(pnum) ((pnum!=NULL) && (pnum->open!=False) && (IVAL(pnum->printer_hnd.data5,4)==(uint32)sys_getpid())) +#define OUR_HANDLE(pnum) ((pnum==NULL)?"NULL":(IVAL(pnum->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")) /* translate between internal status numbers and NT status numbers */ static int nt_printj_status(int v) @@ -215,15 +215,7 @@ static void create_printer_hnd(POLICY_HND *hnd) if (hnd == NULL) return; - /* i severely doubt that prt_hnd_high will ever be non-zero... */ - prt_hnd_low++; - if (prt_hnd_low == 0) prt_hnd_high++; - - SIVAL(hnd->data, 0 , 0x0); /* first bit must be null */ - SIVAL(hnd->data, 4 , prt_hnd_low ); /* second bit is incrementing */ - SIVAL(hnd->data, 8 , prt_hnd_high); /* second bit is incrementing */ - SIVAL(hnd->data, 12, time(NULL)); /* something random */ - SIVAL(hnd->data, 16, sys_getpid()); /* something more random */ + create_policy_handle(hnd, &prt_hnd_low, &prt_hnd_high); } /**************************************************************************** |