static int prepbinding(SOCPTR ***bindings,int argc,char *argv[])
{
+#define OPEP "moderec.c:prepbinding"
+
*bindings=(SOCPTR **)0;
for (int i=0;i<argc;i++) {
int iteration;
PROTYP proto;
char *ipnum;
char *port;
+ char *ptr;
iteration=1;
proto=pro_smtp;
ipnum=DFLTIP;
port=SMTPORT;
+ ptr=argv[i];
+ (void) rou_alert(0,"JMPDBG argv[%d]=<%s>",i,ptr);
+ for (int j=0;j<3;j++) {
+ char *sofar;
+
+ if ((sofar=strchr(ptr,':'))==(char *)0)
+ break;
+ *sofar='\000';
+ sofar++;
+ switch (j) {
+ case 0 :
+ break;
+ case 1 :
+ ipnum=ptr;
+ break;
+ case 2 :
+ if (strlen(ptr)>0)
+ port=ptr;
+ if (strlen(sofar)>0)
+ iteration=atoi(sofar);
+ break;
+ default :
+ (void) rou_alert(0,"%s, Code fault, '%d' unexpected value",OPEP,j);
+ break;
+ }
+ ptr=sofar;
+ }
*bindings=soc_mkbindinf(*bindings,proto,ipnum,port,iteration);
}
return rou_nbrlist(*bindings);
+#undef OPEP
}
/*
\f
(void) rou_alert(0,"%s, No listening IP found (config?)",OPEP);
phase=999;
}
+ childs=(pid_t *)calloc(nbrbind,sizeof(pid_t));
break;
case 1 : //Opening ALL channels
- childs=(pid_t *)calloc(nbrbind,sizeof(pid_t));
for (int i=0;i<nbrbind;i++) {
(void) prc_nozombie();
if (childs[i]==(pid_t)0)