summaryrefslogtreecommitdiffstats
path: root/ctdb/common/ctdb_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/common/ctdb_io.c')
-rw-r--r--ctdb/common/ctdb_io.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c
index 3377aa13338..ea7c17d0198 100644
--- a/ctdb/common/ctdb_io.c
+++ b/ctdb/common/ctdb_io.c
@@ -55,6 +55,16 @@ struct ctdb_queue {
+int ctdb_queue_length(struct ctdb_queue *queue)
+{
+ int i;
+ struct ctdb_queue_pkt *pkt;
+
+ for(i=0, pkt=queue->out_queue;pkt;i++,pkt=pkt->next);
+
+ return i;
+}
+
/*
called when an incoming connection is readable
*/