summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-08-20 22:50:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:26 -0500
commitb894c95f8d5c300d3a609cec5a211fc8bd956d1c (patch)
tree815a16126a6a4b77fa155a301787947c6b96f117
parent167299e17fa5f8b464437559d099f19515321e90 (diff)
downloadsamba-b894c95f8d5c300d3a609cec5a211fc8bd956d1c.tar.gz
samba-b894c95f8d5c300d3a609cec5a211fc8bd956d1c.tar.bz2
samba-b894c95f8d5c300d3a609cec5a211fc8bd956d1c.zip
r1974: Just use a simple linked list for this.
Jeremy. (This used to be commit 77bddd40b0a3cb9d2a95b61c098468d3d98e41b0)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 5775b3ab49..3a5bb8452f 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -64,14 +64,14 @@ struct table_node {
static Printer_entry *printers_list;
typedef struct _counter_printer_0 {
- ubi_dlNode Next;
- ubi_dlNode Prev;
+ struct _counter_printer_0 *next;
+ struct _counter_printer_0 *prev;
int snum;
uint32 counter;
} counter_printer_0;
-static ubi_dlList counter_list;
+static counter_printer_0 *counter_list;
static struct cli_state notify_cli; /* print notify back-channel */
static uint32 smb_connections=0;
@@ -3949,9 +3949,7 @@ static BOOL construct_printer_info_0(Printer_entry *print_hnd, PRINTER_INFO_0 *p
count = print_queue_length(snum, &status);
/* check if we already have a counter for this printer */
- session_counter = (counter_printer_0 *)ubi_dlFirst(&counter_list);
-
- for(; session_counter; session_counter = (counter_printer_0 *)ubi_dlNext(session_counter)) {
+ for(session_counter = counter_list; session_counter; session_counter = session_counter->next) {
if (session_counter->snum == snum)
break;
}
@@ -3965,7 +3963,7 @@ static BOOL construct_printer_info_0(Printer_entry *print_hnd, PRINTER_INFO_0 *p
ZERO_STRUCTP(session_counter);
session_counter->snum=snum;
session_counter->counter=0;
- ubi_dlAddHead( &counter_list, (ubi_dlNode *)session_counter);
+ DLIST_ADD(counter_list, session_counter);
}
/* increment it */