Errorcode return bugfixes

This commit is contained in:
Michiel Broek 2002-10-21 18:29:29 +00:00
parent 02a1621f62
commit e72f7c6274
7 changed files with 192 additions and 216 deletions

View File

@ -180,18 +180,27 @@ This variable must point to the root of the bbs directoy structure.
<pre> <pre>
0 - No errors 0 - No errors
1..32 - OS errors, SIGHUP, SIGKILL, etc. 1..32 - OS errors, SIGHUP, SIGKILL, etc.
101 - No dialout ports available. 100 - Commandline error.
102 - Dial failed (no CONNECT or TCP connection failed). 101 - Configuration error.
103 - Could not reset the modem (no OK). 103 - Disk full.
104 - System is locked. 108 - File transfer error.
105 - not used? 111 - Node not in nodelist.
106 - Nodelist lookup failed. 112 - Node may not be called (Hold, Down, not ZMH).
107 - Call prohibited by config options. 113 - Could not make connection.
108 - Phone number unavailable. 114 - Cannot open tty port.
109 - No matching ports defined. 115 - Node is locked.
110 - Tried to call a CM system outside ZMH. 116 - No IP address.
111..129 - Session failures (not defined). 117 - Unknown session type.
130 - Could not establish session, system is marked undialable. 118 - Not Zone Mail Hour.
119 - Modem error.
120 - Not port available.
121 - Session error.
122 - EMSI session error.
123 - FTSC session error.
124 - Wazoo session error.
125 - YooHoo session error.
126 - Outbound scan error.
127 - Cannot poll.
</pre> </pre>
These codes are also stored in status files for nodes, with the extension These codes are also stored in status files for nodes, with the extension
of ".sts". These are small datafiles containing three decimal numbers. of ".sts". These are small datafiles containing three decimal numbers.

View File

@ -104,12 +104,12 @@ int binkp(int role)
if (role == 1) { if (role == 1) {
Syslog('+', "BINKP start outbound session"); Syslog('+', "BINKP start outbound session");
if (orgbinkp()) { if (orgbinkp()) {
rc = MBERR_FTRANSFER; rc = MBERR_SESSION_ERROR;
} }
} else { } else {
Syslog('+', "BINKP start inbound session"); Syslog('+', "BINKP start inbound session");
if (ansbinkp()) { if (ansbinkp()) {
rc = MBERR_FTRANSFER; rc = MBERR_SESSION_ERROR;
} }
} }

View File

@ -69,7 +69,7 @@ int portopen(faddr *addr)
if ((rc = opentcp(inetaddr))) { if ((rc = opentcp(inetaddr))) {
Syslog('+', "Cannot connect %s", inetaddr); Syslog('+', "Cannot connect %s", inetaddr);
nodeulock(addr); nodeulock(addr);
putstatus(addr,1,MBERR_NO_CONNECTION); // putstatus(addr,1,MBERR_NO_CONNECTION);
return MBERR_NO_CONNECTION; return MBERR_NO_CONNECTION;
} }
return MBERR_OK; return MBERR_OK;
@ -288,9 +288,9 @@ int call(faddr *addr)
return rc; return rc;
} }
if ((rc == MBERR_NOT_ZMH) || (rc == MBERR_UNKNOWN_SESSION)) /* Session error */ if ((rc == MBERR_NOT_ZMH) || (rc == MBERR_SESSION_ERROR)) /* Session error */
putstatus(addr, 5, rc); putstatus(addr, 5, rc);
else if ((rc == MBERR_NO_CONNECTION) || (rc == MBERR_SESSION_ERROR)) else if ((rc == MBERR_NO_CONNECTION) || (rc == MBERR_UNKNOWN_SESSION))
putstatus(addr,1,rc); putstatus(addr,1,rc);
else else
putstatus(addr,0,rc); putstatus(addr,0,rc);

View File

@ -4,19 +4,6 @@
#define CALLSTAT_H #define CALLSTAT_H
#define ST_PORTOK 0
#define ST_PORTERR 1
#define ST_NOCONN 2
#define ST_MDMERR 3
#define ST_LOCKED 4
#define ST_LOOKUP 6
#define ST_NOCALL7 7
#define ST_NOCALL8 8
#define ST_NOPORT 9
#define ST_NOTZMH 10
#define ST_SESSION 30
typedef struct _callstat { typedef struct _callstat {
time_t trytime; time_t trytime;
int tryno; int tryno;

View File

@ -80,8 +80,6 @@ int rx_emsi(char *data)
Syslog('+', "Start inbound EMSI session"); Syslog('+', "Start inbound EMSI session");
emsi_local_lcodes = LCODE_RH1; emsi_local_lcodes = LCODE_RH1;
// if (localoptions & NOPUA)
// emsi_local_lcodes |= LCODE_PUP;
emsi_remote_lcodes=0; emsi_remote_lcodes=0;
emsi_local_protos=LOCAL_PROTOS; emsi_local_protos=LOCAL_PROTOS;
@ -212,10 +210,6 @@ int tx_emsi(char *data)
Syslog('+', "Start outbound EMSI session"); Syslog('+', "Start outbound EMSI session");
emsi_local_lcodes = LCODE_PUA | LCODE_RH1; emsi_local_lcodes = LCODE_PUA | LCODE_RH1;
// if (localoptions & NOPUA) {
// emsi_local_lcodes |= LCODE_PUP;
// emsi_local_lcodes &= ~LCODE_PUA;
// }
emsi_remote_lcodes = 0; emsi_remote_lcodes = 0;
emsi_local_protos=LOCAL_PROTOS; emsi_local_protos=LOCAL_PROTOS;
@ -232,8 +226,6 @@ int tx_emsi(char *data)
} }
emsi_remote_protos=0; emsi_remote_protos=0;
emsi_local_opts=OPT_XMA | OPT_EII | OPT_NRQ; emsi_local_opts=OPT_XMA | OPT_EII | OPT_NRQ;
// if (localoptions & NOFREQS) /* 17-Dec-1998, refuse requests when we pay the bill. */
// emsi_local_opts |= OPT_NRQ;
emsi_remote_opts=0; emsi_remote_opts=0;
emsi_local_password=NULL; emsi_local_password=NULL;
emsi_remote_password=NULL; emsi_remote_password=NULL;
@ -258,7 +250,7 @@ int tx_emsi(char *data)
if ((emsi_remote_protos == 0) || (emsi_remote_lcodes & LCODE_HAT)) { if ((emsi_remote_protos == 0) || (emsi_remote_lcodes & LCODE_HAT)) {
Syslog('+', "Remote refused us: %s", emsi_remote_protos?"traffic held":"no common protos"); Syslog('+', "Remote refused us: %s", emsi_remote_protos?"traffic held":"no common protos");
return 0; return MBERR_SESSION_ERROR;
} }
IsDoing("EMSI %s out", ascfnode(remote->addr, 0x0f)); IsDoing("EMSI %s out", ascfnode(remote->addr, 0x0f));

View File

@ -260,7 +260,7 @@ int tx_yoohoo(void)
if ((rc == 0) && ((capabilities & LOCALCAPS) == 0)) { if ((rc == 0) && ((capabilities & LOCALCAPS) == 0)) {
Syslog('+', "No common protocols"); Syslog('+', "No common protocols");
return 0; return MBERR_SESSION_ERROR;
} }
if (rc) if (rc)

View File

@ -4,18 +4,6 @@
/* $Id$ */ /* $Id$ */
#define ST_PORTERR 1
#define ST_NOCONN 2
#define ST_MDMERR 3
#define ST_LOCKED 4
#define ST_LOOKUP 6
#define ST_NOCALL7 7
#define ST_NOCALL8 8
#define ST_NOPORT 9
#define ST_NOTZMH 10
#define ST_SESSION 30
typedef struct _callstat { typedef struct _callstat {
time_t trytime; time_t trytime;
int tryno; int tryno;