View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000468 | LDMud 3.3 | Compilation, Installation | public | 2006-05-19 13:55 | 2008-07-16 13:57 |
Reporter | lynx | Assigned To | zesstra | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.3 | ||||
Fixed in Version | 3.3.717 | ||||
Summary | 0000468: MAX_OUTCONN is not good for deployment | ||||
Description | MAX_OUTCONN needs to be configurable in setting files, because when users log into psyced, we often need to connect N jabber and psyc servers at once. we are currently using a MAX_OUTCONN of 30, not 5, and we may need to raise it more. we cannot ask end users to patch the comm.c file, so please integrate it into the setting mechanism. what about the name "with_max_connects_outgoing". | ||||
Additional Information | here's a possible comment line for setting files: # Maximum number of contemporary asynchronous connect() attempts with_max_connects_outgoing=30 | ||||
Tags | No tags attached. | ||||
Attached Files | max_outconn.diff (2,375 bytes)
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. | ||||
|
I added this stuff to configure.in AC_INT_VAL_FROM_WITH(max_net_connects) AC_SUBST(val_max_net_connects) AC_MY_ARG_WITH(max_net_connects,20,,) and /* maximum number of currently outgoing connections which are * not yet fully established * psyced needs a quite large value here */ #define MAX_OUTCONN @val_max_net_connects@ to config.h.in that's it. |
|
This is actually a TODO in comm.c. I prepared a small patch (See max_outconn.diff). Do you think, we should enforce a MAX_OUTCONN > 0 in comm.c by some precompiler check? Values <0 should lead to compilation errors and my guess is, that it should be possible to run a driver with net_connect() disabled... |
|
Applied patch without enforcing MAX_OUTCONN > 0 in r2388. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-05-19 13:55 | lynx | New Issue | |
2007-05-04 11:02 | lynx | Note Added: 0000534 | |
2008-06-30 05:58 | zesstra | Status | new => assigned |
2008-06-30 05:58 | zesstra | Assigned To | => zesstra |
2008-07-08 08:24 | zesstra | File Added: max_outconn.diff | |
2008-07-08 09:44 | zesstra | File Deleted: max_outconn.diff | |
2008-07-08 09:44 | zesstra | File Added: max_outconn.diff | |
2008-07-08 09:48 | zesstra | Note Added: 0000675 | |
2008-07-16 13:57 | zesstra | Status | assigned => resolved |
2008-07-16 13:57 | zesstra | Fixed in Version | => 3.3.717 |
2008-07-16 13:57 | zesstra | Resolution | open => fixed |
2008-07-16 13:57 | zesstra | Note Added: 0000730 |