summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_packets.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-06 12:38:24 +1100
committerJeremy Allison <jra@samba.org>2010-02-10 15:36:37 -0800
commitece7089918e37f407f84d13df9d816d5a6d90f2e (patch)
tree3c6919817b656fa3a0f9a99063e14fbb9d55d7b8 /source3/nmbd/nmbd_packets.c
parenta5d2fb752cdb7e27a4949635b6486834d9fac313 (diff)
downloadsamba-ece7089918e37f407f84d13df9d816d5a6d90f2e.tar.gz
samba-ece7089918e37f407f84d13df9d816d5a6d90f2e.tar.bz2
samba-ece7089918e37f407f84d13df9d816d5a6d90f2e.zip
s3-nmbd: update nmbd to use new DLIST_ macros
(cherry picked from commit 4d23d777bc6d4fad20d0f3084fe658635812bee9)
Diffstat (limited to 'source3/nmbd/nmbd_packets.c')
-rw-r--r--source3/nmbd/nmbd_packets.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index a753b2841d..7a6250c2f1 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -1013,20 +1013,7 @@ void queue_packet(struct packet_struct *packet)
{
struct packet_struct *p;
- if (!packet_queue) {
- packet->prev = NULL;
- packet->next = NULL;
- packet_queue = packet;
- return;
- }
-
- /* find the bottom */
- for (p=packet_queue;p->next;p=p->next)
- ;
-
- p->next = packet;
- packet->next = NULL;
- packet->prev = p;
+ DLIST_ADD_END(packet_queue, packet, struct packet_struct *);
}
/****************************************************************************
@@ -1582,10 +1569,7 @@ void run_packet_queue(void)
struct packet_struct *p;
while ((p = packet_queue)) {
- packet_queue = p->next;
- if (packet_queue)
- packet_queue->prev = NULL;
- p->next = p->prev = NULL;
+ DLIST_REMOVE(packet_queue, p);
switch (p->packet_type) {
case NMB_PACKET: