Index: src/comm.c
===================================================================
--- src/comm.c	(Revision 2373)
+++ src/comm.c	(Arbeitskopie)
@@ -443,9 +443,10 @@
 /*-------------------------------------------------------------------------*/
 
 /* Outgoing connections in-progress */
-
-#define MAX_OUTCONN 5 /* TODO: Move this into config.h */
-
+/*#if MAX_OUTCONN < 1
+#error "MAX_OUTCONN is < 1. Please choose a value >= 1 with \
+  --with-max_net_connects or MAX_OUTCONN in config.h"
+#endif*/
 typedef enum {
       ocNotUsed    /* Entry not used */
     , ocUsed       /* Entry holds pending connection */
Index: src/autoconf/configure.in
===================================================================
--- src/autoconf/configure.in	(Revision 2375)
+++ src/autoconf/configure.in	(Arbeitskopie)
@@ -219,6 +219,7 @@
 AC_MY_ARG_WITH(total-trace-length,0x1000,,)
 AC_MY_ARG_WITH(pcre-recursion-limit,3000,,[maximum number of recursions in PCRE package])
 AC_MY_ARG_WITH(wizlist-file,WIZLIST,,[name of the wizlist file])
+AC_MY_ARG_WITH(max_net_connects,10,,[maximum number of concurrent connection attempts])
 
 AC_ARG_WITH(setting,[  --with-setting=SETTING  include a predefined setting],[
 if test -f "settings/$withval" ; then
@@ -446,6 +447,7 @@
 AC_INT_VAL_FROM_WITH(max_malloced)
 AC_INT_VAL_FROM_WITH(total_trace_length)
 AC_INT_VAL_FROM_WITH(pcre_recursion_limit)
+AC_INT_VAL_FROM_WITH(max_net_connects)
 
 if test "x$cdef_access_control" = "x#undef"; then
   cdef_access_log="#undef"
@@ -2742,6 +2744,7 @@
 AC_SUBST(val_total_trace_length)
 AC_SUBST(val_wizlist_file)
 AC_SUBST(val_pcre_recursion_limit)
+AC_SUBST(val_max_net_connects)
 
 dnl finally: some remaining stuff
 dnl
Index: src/config.h.in
===================================================================
--- src/config.h.in	(Revision 2375)
+++ src/config.h.in	(Arbeitskopie)
@@ -198,12 +198,15 @@
 
 /* If you want to use threads to write the data to the sockets 
  * define USE_PTHREADS.
- */
- 
+ */ 
 @cdef_use_pthreads@ USE_PTHREADS
 
- 
+/* maximum number of concurrent outgoing connection attempts by net_connect()
+ * (that is connections that are in progress but not fully established yet).
+ */
+#define MAX_OUTCONN @val_max_net_connects@
 
+
 /* ----------- Compilation Options ----------
  * To change these options, the config.h must be recreated and the
  * driver recompiled.
