diff include/freeDiameter/libfdproto.h @ 767:c47c16436f71

Added a limit on fifo queues to avoid memory exaustion when messages are received faster than handled
author Sebastien Decugis <sdecugis@nict.go.jp>
date Sun, 23 Oct 2011 23:43:32 +0200
parents f53e5b5fdfd3
children 99136ec7d9d4
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h	Sat Oct 22 22:56:55 2011 +0200
+++ b/include/freeDiameter/libfdproto.h	Sun Oct 23 23:43:32 2011 +0200
@@ -2758,6 +2758,8 @@
  *
  * PARAMETERS:
  *  queue	: Upon success, a pointer to the new queue is saved here.
+ *  max		: max number of items in the queue. Above this number, adding a new item becomes a
+ *		  blocking operation. Use 0 to disable this maximum.
  *
  * DESCRIPTION: 
  *  Create a new empty queue.
@@ -2767,7 +2769,7 @@
  *  EINVAL 	: The parameter is invalid.
  *  ENOMEM	: Not enough memory to complete the creation.  
  */
-int fd_fifo_new ( struct fifo ** queue );
+int fd_fifo_new ( struct fifo ** queue, int max );
 
 /*
  * FUNCTION:	fd_fifo_del
"Welcome to our mercurial repository"