summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-05 00:54:33 +0000
committerJeremy Allison <jra@samba.org>2001-12-05 00:54:33 +0000
commit547263873017bd7e042f8826b68a3136c4e3b2f8 (patch)
tree34536c96e7bb46bba14410f62132a92dd7e34463 /source3/rpc_server
parent38d10d2ac1e23681c025af8b37db037cd5d6b940 (diff)
downloadsamba-547263873017bd7e042f8826b68a3136c4e3b2f8.tar.gz
samba-547263873017bd7e042f8826b68a3136c4e3b2f8.tar.bz2
samba-547263873017bd7e042f8826b68a3136c4e3b2f8.zip
Improved efficiency of enumerating print queue's under a particular
extreme condition... Jeremy. (This used to be commit 425bb0f40526b4eb17a3033892ca907b1d5293a4)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c11
1 files changed, 2 insertions, 9 deletions
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);
}
/*******************************************************************