|
|
@@ -221,7 +221,7 @@ Options:\n\
|
|
|
-W poll method\n"
|
|
|
#endif
|
|
|
#ifdef USE_SCTP
|
|
|
-" -S Disable sctp\n\
|
|
|
+" -S disable sctp\n\
|
|
|
-O Number of sctp child processes (default: equal to `-n')\n"
|
|
|
#endif /* USE_SCTP */
|
|
|
" -V Version number\n\
|
|
|
@@ -303,7 +303,7 @@ int tls_disable = 1; /* tls disabled by default */
|
|
|
#endif /* USE_TLS */
|
|
|
#ifdef USE_SCTP
|
|
|
int sctp_children_no = 0;
|
|
|
-int sctp_disable = 0; /* 1 if sctp is disabled */
|
|
|
+int sctp_disable = 2; /* 1 if sctp is disabled, 2 if auto mode, 0 enabled */
|
|
|
#endif /* USE_SCTP */
|
|
|
|
|
|
struct process_table *pt=0; /*array with children pids, 0= main proc,
|
|
|
@@ -1819,6 +1819,21 @@ try_again:
|
|
|
}
|
|
|
#endif
|
|
|
#ifdef USE_SCTP
|
|
|
+ if (sctp_disable!=1){
|
|
|
+ /* fix it */
|
|
|
+ if (sctp_check_support()==-1){
|
|
|
+ /* check if sctp support is auto, if not warn about disabling it */
|
|
|
+ if (sctp_disable!=2){
|
|
|
+ fprintf(stderr, "ERROR: " "sctp enabled, but not supported by"
|
|
|
+ " the OS\n");
|
|
|
+ goto error;
|
|
|
+ }
|
|
|
+ sctp_disable=1;
|
|
|
+ }else{
|
|
|
+ /* sctp_disable!=1 and sctp supported => enable sctp */
|
|
|
+ sctp_disable=0;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!sctp_disable){
|
|
|
if (sctp_children_no<=0) sctp_children_no=children_no;
|
|
|
}
|