diff libfdcore/cnxctx.c @ 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 4a9f08d6b6ba
children d5a4b5e175c2
line wrap: on
line diff
--- a/libfdcore/cnxctx.c	Sat Oct 22 22:56:55 2011 +0200
+++ b/libfdcore/cnxctx.c	Sun Oct 23 23:43:32 2011 +0200
@@ -89,7 +89,7 @@
 	memset(conn, 0, sizeof(struct cnxctx));
 
 	if (full) {
-		CHECK_FCT_DO( fd_fifo_new ( &conn->cc_incoming ), return NULL );
+		CHECK_FCT_DO( fd_fifo_new ( &conn->cc_incoming, 5 ), return NULL );
 	}
 
 	return conn;
"Welcome to our mercurial repository"