From 547263873017bd7e042f8826b68a3136c4e3b2f8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 5 Dec 2001 00:54:33 +0000 Subject: Improved efficiency of enumerating print queue's under a particular extreme condition... Jeremy. (This used to be commit 425bb0f40526b4eb17a3033892ca907b1d5293a4) --- source3/rpc_server/srv_spoolss_nt.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 1d54c92bce..d49cee0d25 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1835,14 +1835,12 @@ static void spoolss_notify_status(int snum, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx) { - print_queue_struct *q=NULL; print_status_struct status; memset(&status, 0, sizeof(status)); - print_queue_status(snum, &q, &status); + print_queue_length(snum, &status); data->notify_data.value[0]=(uint32) status.status; data->notify_data.value[1] = 0; - SAFE_FREE(q); } /******************************************************************* @@ -1854,13 +1852,8 @@ static void spoolss_notify_cjobs(int snum, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx) { - print_queue_struct *q=NULL; - print_status_struct status; - - memset(&status, 0, sizeof(status)); - data->notify_data.value[0] = print_queue_status(snum, &q, &status); + data->notify_data.value[0] = print_queue_length(snum, NULL); data->notify_data.value[1] = 0; - SAFE_FREE(q); } /******************************************************************* -- cgit