|
|
@ -480,15 +480,10 @@ int call_system_tcpip(int callwith) // only TCPIP values
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char abuf[BF_MAXADDRSTR+1];
|
|
|
|
char abuf[BF_MAXADDRSTR+1];
|
|
|
|
int rc = BFERR_NOERROR;
|
|
|
|
int rc = BFERR_NOERROR;
|
|
|
|
char * pbuf;
|
|
|
|
|
|
|
|
char * target;
|
|
|
|
|
|
|
|
int resflg;
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Set verbal line name to "tcpip" value
|
|
|
|
* Set verbal line name to "tcpip" value
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
memset(abuf, '\0', BF_MAXADDRSTR+1);
|
|
|
|
|
|
|
|
target = xmalloc(1024);
|
|
|
|
|
|
|
|
memset(target, '\0', 1024);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state.linename = xstrcpy("tcpip");
|
|
|
|
state.linename = xstrcpy("tcpip");
|
|
|
|
state.inet = TRUE;
|
|
|
|
state.inet = TRUE;
|
|
|
@ -507,17 +502,14 @@ int call_system_tcpip(int callwith) // only TCPIP values
|
|
|
|
case CALL_TCPIP_BINKP:
|
|
|
|
case CALL_TCPIP_BINKP:
|
|
|
|
state.tcpmode = TCPMODE_BINKP;
|
|
|
|
state.tcpmode = TCPMODE_BINKP;
|
|
|
|
state.session = SESSION_BINKP;
|
|
|
|
state.session = SESSION_BINKP;
|
|
|
|
target = xstrcpy("IBN");
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case CALL_TCPIP_IFCICO:
|
|
|
|
case CALL_TCPIP_IFCICO:
|
|
|
|
state.tcpmode = TCPMODE_RAW;
|
|
|
|
state.tcpmode = TCPMODE_RAW;
|
|
|
|
state.session = SESSION_UNKNOWN;
|
|
|
|
state.session = SESSION_UNKNOWN;
|
|
|
|
target = xstrcpy("IFC");
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case CALL_TCPIP_TELNET:
|
|
|
|
case CALL_TCPIP_TELNET:
|
|
|
|
state.tcpmode = TCPMODE_TELNET;
|
|
|
|
state.tcpmode = TCPMODE_TELNET;
|
|
|
|
state.session = SESSION_UNKNOWN;
|
|
|
|
state.session = SESSION_UNKNOWN;
|
|
|
|
target = xstrcpy("ITN");
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
defalt:
|
|
|
|
defalt:
|
|
|
|
log("invalid protocol for TCP/IP module");
|
|
|
|
log("invalid protocol for TCP/IP module");
|
|
|
@ -529,44 +521,7 @@ defalt:
|
|
|
|
(state.node.name && *state.node.name ) ? state.node.name : "<none>",
|
|
|
|
(state.node.name && *state.node.name ) ? state.node.name : "<none>",
|
|
|
|
(state.node.host && *state.node.host) ? state.node.host : "<none>");
|
|
|
|
(state.node.host && *state.node.host) ? state.node.host : "<none>");
|
|
|
|
|
|
|
|
|
|
|
|
memset(abuf, '\0', BF_MAXADDRSTR+1);
|
|
|
|
if( (rc = tcpip_connect(state.node.host, state.tcpmode)) == 0
|
|
|
|
pbuf = xmalloc(1024);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resflg = nodelist_lookup_string(pbuf, 1024, state.node.addr);
|
|
|
|
|
|
|
|
if ( ! resflg )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char *p = strcasestr(pbuf, target);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( p )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
target = strchr(p, ',');
|
|
|
|
|
|
|
|
if ( target ) target[0] = '\0';
|
|
|
|
|
|
|
|
target = strrchr(p, ':');
|
|
|
|
|
|
|
|
if ( target ) {
|
|
|
|
|
|
|
|
target++;
|
|
|
|
|
|
|
|
strcpy(abuf,target);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
free(pbuf);
|
|
|
|
|
|
|
|
pbuf = xstrcpy(state.node.host);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( ! resflg )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ( abuf[0] != '\0' )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// port not empty
|
|
|
|
|
|
|
|
DEB((D_EVENT, "Modifying host address %s with port %s", pbuf, abuf));
|
|
|
|
|
|
|
|
pbuf = xstrcat(pbuf, ":");
|
|
|
|
|
|
|
|
pbuf = xstrcat(pbuf, abuf);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( (rc = tcpip_connect(pbuf, state.tcpmode)) == 0
|
|
|
|
|
|
|
|
&& (rc = tcpip_init() == 0) )
|
|
|
|
&& (rc = tcpip_init() == 0) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TTYSTATUS(1);
|
|
|
|
TTYSTATUS(1);
|
|
|
@ -577,7 +532,7 @@ defalt:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rc = BFERR_CANT_CONNECT10;
|
|
|
|
rc = BFERR_CANT_CONNECT10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free(pbuf);
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -588,7 +543,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
char s[300];
|
|
|
|
char s[300];
|
|
|
|
snprintf(s, 299, "bforce calling system %d:%d/%d.%d", addr.zone, addr.net, addr.node, addr.point );
|
|
|
|
snprintf(s, 299, "bforce calling system %d:%d/%d.%d", addr.zone, addr.net, addr.node, addr.point );
|
|
|
|
log(s);
|
|
|
|
log(s);
|
|
|
|
DEB((D_EVENT, s));
|
|
|
|
|
|
|
|
// find suitable way of connection and try to make session
|
|
|
|
// find suitable way of connection and try to make session
|
|
|
|
|
|
|
|
|
|
|
|
int rc = 0;
|
|
|
|
int rc = 0;
|
|
|
@ -613,13 +568,12 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
state.listed = state.node.listed;
|
|
|
|
state.listed = state.node.listed;
|
|
|
|
//DEB((D_EVENT, "Calling init, listed=%d", state.listed));
|
|
|
|
|
|
|
|
state.node.addr.domain[0] = '\0'; /* Discard domain for node address */
|
|
|
|
state.node.addr.domain[0] = '\0'; /* Discard domain for node address */
|
|
|
|
|
|
|
|
|
|
|
|
// 1. If call method specified in cmdline, do use it
|
|
|
|
// 1. If call method specified in cmdline, do use it
|
|
|
|
// 2. If not, use nodelist data and overrides and call all available methods
|
|
|
|
// 2. If not, use nodelist data and overrides and call all available methods
|
|
|
|
// If override contains Phone or IP flags, ignore nodelist connect methods (but save INA if not overrided)
|
|
|
|
// If override contains Phone or IP flags, ignore nodelist connect methods (but save INA if not overrided)
|
|
|
|
DEB((D_EVENT, "Calling init, runmode=%d", opts->runmode));
|
|
|
|
|
|
|
|
// 1st - get all allowed call ways
|
|
|
|
// 1st - get all allowed call ways
|
|
|
|
// 2nd - gather information reqired to call and remove unavailable ways (no info, node does not support)
|
|
|
|
// 2nd - gather information reqired to call and remove unavailable ways (no info, node does not support)
|
|
|
|
|
|
|
|
|
|
|
@ -627,7 +581,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
|
|
|
|
|
|
|
|
if( opts->runmode == MODE_CALL_DEFAULT )
|
|
|
|
if( opts->runmode == MODE_CALL_DEFAULT )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
call_mustuse = CALL_MODEM | CALL_TCPIP_ANY;
|
|
|
|
call_mayuse = CALL_MODEM | CALL_TCPIP_ANY;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( opts->runmode == MODE_CALL_STDIO )
|
|
|
|
else if( opts->runmode == MODE_CALL_STDIO )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -639,14 +593,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( opts->runmode == MODE_CALL_IP )
|
|
|
|
else if( opts->runmode == MODE_CALL_IP )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT, "Calling init, MODE_CALL_IP"));
|
|
|
|
if( strcasecmp(opts->ipproto, "binkp") == 0 )
|
|
|
|
if( !(opts->ipproto) ) // determine from nodelist/override
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DEB((D_EVENT, "ipproto not set"));
|
|
|
|
|
|
|
|
call_mayuse = CALL_TCPIP_ANY;
|
|
|
|
|
|
|
|
call_mustuse = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if( strcasecmp(opts->ipproto, "binkp") == 0 )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
call_mustuse = CALL_TCPIP_BINKP;
|
|
|
|
call_mustuse = CALL_TCPIP_BINKP;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -658,17 +605,20 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
call_mustuse = CALL_TCPIP_TELNET;
|
|
|
|
call_mustuse = CALL_TCPIP_TELNET;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if( opts->ipproto == NULL ) // determine from nodelist/override
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
call_mayuse = CALL_TCPIP_ANY;
|
|
|
|
|
|
|
|
call_mustuse = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT, "Unknown protocol %s", opts->ipproto));
|
|
|
|
|
|
|
|
log("Unknown protocol");
|
|
|
|
log("Unknown protocol");
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT, "Unknown runmode %d", opts->runmode));
|
|
|
|
log("Unknown protocol");
|
|
|
|
log("Unknown runmode");
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -677,10 +627,9 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
//char s[300];
|
|
|
|
//char s[300];
|
|
|
|
//snprintf(s, 299, "initial: may use %d must use %d", call_mayuse, call_mustuse);
|
|
|
|
//snprintf(s, 299, "initial: may use %d must use %d", call_mayuse, call_mustuse);
|
|
|
|
//log(s);
|
|
|
|
//log(s);
|
|
|
|
//DEB((D_EVENT, s));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( (call_mayuse & CALL_MODEM) )
|
|
|
|
if( call_mayuse & CALL_MODEM )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// 1. use phone from opts
|
|
|
|
// 1. use phone from opts
|
|
|
|
// 2. use overrides
|
|
|
|
// 2. use overrides
|
|
|
@ -701,7 +650,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
log("bad phone, excluding modem");
|
|
|
|
log("bad phone, excluding modem");
|
|
|
|
call_mayuse &= ~CALL_MODEM;
|
|
|
|
call_mayuse &= ~CALL_MODEM;
|
|
|
|
if( !(call_mayuse) )
|
|
|
|
if( call_mustuse & CALL_MODEM )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
errmsg = "don't know phone number";
|
|
|
|
errmsg = "don't know phone number";
|
|
|
|
gotoexit(BFERR_PHONE_UNKNOWN);
|
|
|
|
gotoexit(BFERR_PHONE_UNKNOWN);
|
|
|
@ -735,7 +684,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
call_mayuse &= ~CALL_MODEM;
|
|
|
|
call_mayuse &= ~CALL_MODEM;
|
|
|
|
log("bad worktime, excluding modem");
|
|
|
|
log("bad worktime, excluding modem");
|
|
|
|
if( !(call_mayuse) )
|
|
|
|
if( call_mustuse & CALL_MODEM )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
errmsg = "not works now, try later";
|
|
|
|
errmsg = "not works now, try later";
|
|
|
|
gotoexit(BFERR_NOTWORKING);
|
|
|
|
gotoexit(BFERR_NOTWORKING);
|
|
|
@ -746,7 +695,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
|
|
|
|
|
|
|
|
// snprintf(s, 299, "after phone check: may use %d must use %d", call_mayuse, call_mustuse);
|
|
|
|
// snprintf(s, 299, "after phone check: may use %d must use %d", call_mayuse, call_mustuse);
|
|
|
|
// log(s);
|
|
|
|
// log(s);
|
|
|
|
//DEB((D_EVENT, s));
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Apply overrides to the node information
|
|
|
|
* Apply overrides to the node information
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -765,8 +714,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
|
|
|
|
|
|
|
|
if( !(call_mustuse & CALL_TCPIP_BINKP) && (call_mayuse & CALL_TCPIP_BINKP) )
|
|
|
|
if( !(call_mustuse & CALL_TCPIP_BINKP) && (call_mayuse & CALL_TCPIP_BINKP) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//if( nodelist_checkflag(state.node.flags, "BINKP") != 0 && nodelist_checkflag(state.node.flags, "IBN") != 0 )
|
|
|
|
if( nodelist_checkflag(state.node.flags, "BINKP") != 0 && nodelist_checkflag(state.node.flags, "IBN") != 0 )
|
|
|
|
if( state.node.do_binkp == 0 )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
call_mayuse &= ~CALL_TCPIP_BINKP;
|
|
|
|
call_mayuse &= ~CALL_TCPIP_BINKP;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -774,8 +722,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
|
|
|
|
|
|
|
|
if( !(call_mustuse & CALL_TCPIP_IFCICO) && (call_mayuse & CALL_TCPIP_IFCICO) )
|
|
|
|
if( !(call_mustuse & CALL_TCPIP_IFCICO) && (call_mayuse & CALL_TCPIP_IFCICO) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//if( nodelist_checkflag(state.node.flags, "IFC") != 0 && nodelist_checkflag(state.node.flags, "IFC") != 0 )
|
|
|
|
if( nodelist_checkflag(state.node.flags, "IFC") != 0 && nodelist_checkflag(state.node.flags, "IFC") != 0 )
|
|
|
|
if( state.node.do_ifcico == 0 )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
call_mayuse &= ~CALL_TCPIP_IFCICO;
|
|
|
|
call_mayuse &= ~CALL_TCPIP_IFCICO;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -783,8 +730,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
|
|
|
|
|
|
|
|
if( !(call_mustuse & CALL_TCPIP_TELNET) && (call_mayuse & CALL_TCPIP_TELNET) )
|
|
|
|
if( !(call_mustuse & CALL_TCPIP_TELNET) && (call_mayuse & CALL_TCPIP_TELNET) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//if( nodelist_checkflag(state.node.flags, "TELN") != 0 && nodelist_checkflag(state.node.flags, "TLN") != 0 )
|
|
|
|
if( nodelist_checkflag(state.node.flags, "TELN") != 0 && nodelist_checkflag(state.node.flags, "TLN") != 0 )
|
|
|
|
if( state.node.do_telnet == 0 )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
call_mayuse &= ~CALL_TCPIP_TELNET;
|
|
|
|
call_mayuse &= ~CALL_TCPIP_TELNET;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -800,12 +746,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
state.override.sIpaddr, sizeof(state.node.host));
|
|
|
|
state.override.sIpaddr, sizeof(state.node.host));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//DEB((D_EVENT, "Calling init, IPHOST", state.node.host));
|
|
|
|
if( call_mayuse & CALL_TCPIP_ANY && !tcpip_isgood_host(state.node.host) ) {
|
|
|
|
|
|
|
|
|
|
|
|
// We have at least one protocol and not valid address - try to
|
|
|
|
|
|
|
|
// find INA with through Fidonet DNS
|
|
|
|
|
|
|
|
if( (call_mayuse & CALL_TCPIP_ANY) && !tcpip_isgood_host(state.node.host) )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
char *fidodnszone = conf_string(cf_fidodnszone);
|
|
|
|
char *fidodnszone = conf_string(cf_fidodnszone);
|
|
|
|
if (fidodnszone) {
|
|
|
|
if (fidodnszone) {
|
|
|
|
if (addr.point) {
|
|
|
|
if (addr.point) {
|
|
|
@ -820,21 +761,17 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// We have no valid tcpip protocols OR not valid address
|
|
|
|
if( call_mayuse & CALL_TCPIP_ANY && !tcpip_isgood_host(state.node.host) )
|
|
|
|
if( !(call_mayuse & CALL_TCPIP_ANY) || !tcpip_isgood_host(state.node.host) )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
call_mayuse &= ~CALL_TCPIP_ANY;
|
|
|
|
call_mayuse &= ~CALL_TCPIP_ANY;
|
|
|
|
log("bad host, exclude IP");
|
|
|
|
log("bad host, exclude IP");
|
|
|
|
DEB((D_EVENT, "bad host or proto -> exclude IP, mayuse=%d", call_mayuse));
|
|
|
|
if( call_mustuse & CALL_TCPIP_ANY )
|
|
|
|
|
|
|
|
|
|
|
|
// If we had ONLY tcpip command - go out with error
|
|
|
|
|
|
|
|
if( !(call_mayuse) )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
errmsg = "Aborting, don't know host name";
|
|
|
|
errmsg = "don't know host name";
|
|
|
|
gotoexit(BFERR_PHONE_UNKNOWN);
|
|
|
|
gotoexit(BFERR_PHONE_UNKNOWN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DEB((D_EVENT,"sess_call: may use %d must use %d", call_mayuse, call_mustuse));
|
|
|
|
|
|
|
|
// snprintf(s, 299, "after IP check: may use %d must use %d", call_mayuse, call_mustuse);
|
|
|
|
// snprintf(s, 299, "after IP check: may use %d must use %d", call_mayuse, call_mustuse);
|
|
|
|
// log(s);
|
|
|
|
// log(s);
|
|
|
|
|
|
|
|
|
|
|
@ -871,33 +808,28 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
// try allowed methods and break if rc == 0
|
|
|
|
// try allowed methods and break if rc == 0
|
|
|
|
rc = -1;
|
|
|
|
rc = -1;
|
|
|
|
|
|
|
|
|
|
|
|
if( rc && (call_mayuse & CALL_STDIO) )
|
|
|
|
if( rc && call_mayuse & CALL_STDIO )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT,"sess_call: calling stdio"));
|
|
|
|
|
|
|
|
rc = call_system_quiet(opts->connect, opts->inetd);
|
|
|
|
rc = call_system_quiet(opts->connect, opts->inetd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( rc && (call_mayuse & CALL_TCPIP_BINKP) )
|
|
|
|
if( rc && call_mayuse & CALL_TCPIP_BINKP )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT,"sess_call: calling binkp"));
|
|
|
|
|
|
|
|
rc = call_system_tcpip(CALL_TCPIP_BINKP);
|
|
|
|
rc = call_system_tcpip(CALL_TCPIP_BINKP);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( rc && (call_mayuse & CALL_TCPIP_IFCICO) )
|
|
|
|
if( rc && call_mayuse & CALL_TCPIP_IFCICO )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT,"sess_call: calling ifcico"));
|
|
|
|
|
|
|
|
rc = call_system_tcpip(CALL_TCPIP_IFCICO);
|
|
|
|
rc = call_system_tcpip(CALL_TCPIP_IFCICO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( rc && (call_mayuse & CALL_TCPIP_TELNET) )
|
|
|
|
if( rc && call_mayuse & CALL_TCPIP_TELNET )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT,"sess_call: calling telnet"));
|
|
|
|
|
|
|
|
rc = call_system_tcpip(CALL_TCPIP_TELNET);
|
|
|
|
rc = call_system_tcpip(CALL_TCPIP_TELNET);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( rc && (call_mayuse & CALL_MODEM) )
|
|
|
|
if( rc && call_mayuse & CALL_MODEM )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT,"sess_call: calling MODEM"));
|
|
|
|
|
|
|
|
setproctitle("bforce calling %.32s, %.32s",
|
|
|
|
setproctitle("bforce calling %.32s, %.32s",
|
|
|
|
ftn_addrstr(abuf, state.node.addr), state.node.phone);
|
|
|
|
ftn_addrstr(abuf, state.node.addr), state.node.phone);
|
|
|
|
rc = -1;
|
|
|
|
rc = -1;
|
|
|
@ -918,7 +850,6 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
|
|
|
|
|
|
|
|
|
|
|
|
if( port_lock(p_lockdir, state.modemport) == 0 ) /* Successfuly locked port */
|
|
|
|
if( port_lock(p_lockdir, state.modemport) == 0 ) /* Successfuly locked port */
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_EVENT,"sess_call: call_system_modem running"));
|
|
|
|
|
|
|
|
rc = call_system_modem();
|
|
|
|
rc = call_system_modem();
|
|
|
|
port_unlock(p_lockdir, state.modemport);
|
|
|
|
port_unlock(p_lockdir, state.modemport);
|
|
|
|
}
|
|
|
|
}
|
|
|
|