summaryrefslogtreecommitdiffstats
path: root/lib/mqueue.c
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-02-01 10:27:55 +0000
committerChris Hall <GMCH@hestia.halldom.com>2010-02-01 10:27:55 +0000
commite51f1f9733ddc294bffb50fc29f25dcdebf44d6d (patch)
treea61b34b67492be7d2ca457523ad644c0395d4fa9 /lib/mqueue.c
parent64b08a2d2ec89e5464d7489f239a5b23a7a0c17b (diff)
downloadquagga-e51f1f9733ddc294bffb50fc29f25dcdebf44d6d.tar.bz2
quagga-e51f1f9733ddc294bffb50fc29f25dcdebf44d6d.tar.xz
Simplified handling of connection pending queue.
Moved some of the complexity into functions in bgp_connection, so that "do" functions in bgp_session have to deal with less of the mechanics. modified: bgpd/bgp_connection.c modified: bgpd/bgp_connection.h modified: bgpd/bgp_session.c modified: bgpd/bgp_session.h modified: lib/mqueue.c modified: lib/mqueue.h
Diffstat (limited to 'lib/mqueue.c')
-rw-r--r--lib/mqueue.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/mqueue.c b/lib/mqueue.c
index 7156e31e..de1d654c 100644
--- a/lib/mqueue.c
+++ b/lib/mqueue.c
@@ -708,7 +708,7 @@ mqueue_done_waiting(mqueue_queue mq, mqueue_thread_signal mtsig)
} ;
/*------------------------------------------------------------------------------
- * Enqueue message on local queue
+ * Enqueue message on local queue -- at tail
*/
extern void
mqueue_local_enqueue(mqueue_local_queue lmq, mqueue_block mqb)
@@ -722,6 +722,19 @@ mqueue_local_enqueue(mqueue_local_queue lmq, mqueue_block mqb)
} ;
/*------------------------------------------------------------------------------
+ * Enqueue message on local queue -- at head
+ */
+extern void
+mqueue_local_enqueue_head(mqueue_local_queue lmq, mqueue_block mqb)
+{
+ if (lmq->head == NULL)
+ lmq->tail = mqb ;
+
+ mqb->next = lmq->head ;
+ lmq->head = mqb ;
+} ;
+
+/*------------------------------------------------------------------------------
* Dequeue message from local queue -- returns NULL if empty
*/
extern mqueue_block