Fixes for mbcico history data
This commit is contained in:
parent
6808f4559a
commit
3d11c24969
@ -4845,6 +4845,8 @@ v0.33.20 10-Feb-2002
|
||||
Splitted no TCP settings in no IBN, no IFC and no ITN.
|
||||
Removed settings for Non-hold mail and Pickup Primary.
|
||||
Removed nonsense error message when stopped on a signal.
|
||||
Fixed some small problems with the history data log. Added tty
|
||||
information when it is available.
|
||||
|
||||
mbout:
|
||||
The status display has now 9 digits for the outbound size.
|
||||
|
@ -78,6 +78,7 @@ int answer(char *stype)
|
||||
q = strrchr(ttyname(0), '/');
|
||||
if (q)
|
||||
p = q + 1;
|
||||
strncpy(history.tty, p, 6);
|
||||
if (load_port(p))
|
||||
Syslog('d', "Port %s, modem %s", ttyinfo.tty, modem.modem);
|
||||
else
|
||||
@ -141,7 +142,7 @@ int answer(char *stype)
|
||||
history.rcvd_bytes = rcvdbytes;
|
||||
history.inbound = TRUE;
|
||||
|
||||
p = calloc(128, sizeof(char));
|
||||
p = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(p, "%s/var/mailer.hist", getenv("MBSE_ROOT"));
|
||||
if ((fp = fopen(p, "a")) == NULL)
|
||||
WriteError("$Can't open %s", p);
|
||||
@ -151,7 +152,6 @@ int answer(char *stype)
|
||||
}
|
||||
free(p);
|
||||
if (Loaded) {
|
||||
Syslog('s', "Updateing noderecord %s", aka2str(nodes.Aka[0]));
|
||||
nodes.LastDate = time(NULL);
|
||||
UpdateNode();
|
||||
}
|
||||
|
@ -339,16 +339,13 @@ void b_nul(char *msg)
|
||||
{
|
||||
if (strncmp(msg, "SYS ", 4) == 0) {
|
||||
Syslog('+', "System : %s", msg+4);
|
||||
msg[40] = '\0';
|
||||
sprintf(history.system_name, "%s", msg+4);
|
||||
strncpy(history.system_name, msg+4, 35);
|
||||
} else if (strncmp(msg, "ZYZ ", 4) == 0) {
|
||||
Syslog('+', "Sysop : %s", msg+4);
|
||||
msg[40] = '\0';
|
||||
sprintf(history.sysop, "%s", msg+4);
|
||||
strncpy(history.sysop, msg+4, 35);
|
||||
} else if (strncmp(msg, "LOC ", 4) == 0) {
|
||||
Syslog('+', "Location: %s", msg+4);
|
||||
msg[40] = '\0';
|
||||
sprintf(history.location, "%s", msg+4);
|
||||
strncpy(history.location, msg+4, 35);
|
||||
} else if (strncmp(msg, "NDL ", 4) == 0)
|
||||
Syslog('+', "Flags : %s", msg+4);
|
||||
else if (strncmp(msg, "TIME ", 5) == 0)
|
||||
|
@ -75,6 +75,7 @@ int portopen(faddr *addr)
|
||||
if (forcedline) {
|
||||
Syslog('d', "portopen forcedline %s", forcedline);
|
||||
p = forcedline;
|
||||
strncpy(history.tty, p, 6);
|
||||
|
||||
if (load_port(p)) {
|
||||
if ((rc = openport(p, ttyinfo.portspeed))) {
|
||||
@ -133,8 +134,9 @@ int call(faddr *addr)
|
||||
/*
|
||||
* Fill default history info in case we get a FTS0001 session
|
||||
*/
|
||||
sprintf(history.system_name, "%s", nlent->name);
|
||||
sprintf(history.location, "%s", nlent->location);
|
||||
strncpy(history.system_name, nlent->name, 35);
|
||||
strncpy(history.location, nlent->location, 35);
|
||||
strncpy(history.sysop, nlent->sysop, 35);
|
||||
history.aka.zone = addr->zone;
|
||||
history.aka.net = addr->net;
|
||||
history.aka.node = addr->node;
|
||||
|
@ -139,7 +139,6 @@ int hangup()
|
||||
free(tmp);
|
||||
memset(&history, 0, sizeof(history));
|
||||
if (Loaded) {
|
||||
Syslog('s', "Updateing noderecord %s", aka2str(nodes.Aka[0]));
|
||||
nodes.LastDate = time(NULL);
|
||||
UpdateNode();
|
||||
}
|
||||
|
@ -441,12 +441,11 @@ int scanemsidat(char *buf)
|
||||
if (strcasecmp(p,"IDENT") == 0) {
|
||||
p=sel_brace(NULL);
|
||||
Syslog('+', "system : %s",(p=sel_bracket(p)));
|
||||
sprintf(history.system_name, "%s", p);
|
||||
history.system_name[36] = '\0';
|
||||
strncpy(history.system_name, p, 35);
|
||||
Syslog('+', "location: %s",(p=sel_bracket(NULL)));
|
||||
sprintf(history.location, "%s", p);
|
||||
strncpy(history.location, p, 35);
|
||||
Syslog('+', "operator: %s",(p=sel_bracket(NULL)));
|
||||
sprintf(history.sysop, "%s", p);
|
||||
strncpy(history.sysop, p, 35);
|
||||
if (remote && remote->addr)
|
||||
remote->addr->name=xstrcpy(p);
|
||||
Syslog('+', "phone : %s",sel_bracket(NULL));
|
||||
|
@ -436,8 +436,9 @@ SM_STATE(scan_packet)
|
||||
if (inbound)
|
||||
free(inbound);
|
||||
inbound = xstrcpy(CFG.inbound);
|
||||
sprintf(history.system_name, "%s", nlent->name);
|
||||
sprintf(history.location, "%s", nlent->location);
|
||||
strncpy(history.system_name, nlent->name, 35);
|
||||
strncpy(history.location, nlent->location, 35);
|
||||
strncpy(history.sysop, nlent->sysop, 35);
|
||||
} else {
|
||||
sprintf(history.system_name, "Unknown");
|
||||
sprintf(history.location, "Somewhere");
|
||||
|
@ -162,7 +162,7 @@ int rx_yoohoo(void)
|
||||
if (inbound)
|
||||
free(inbound);
|
||||
inbound = xstrcpy(CFG.inbound);
|
||||
sprintf(history.location, "%s", nlent->location);
|
||||
strncpy(history.location, nlent->location, 35);
|
||||
}
|
||||
if (nlent)
|
||||
rdoptions(Loaded);
|
||||
@ -594,10 +594,9 @@ int checkhello(void)
|
||||
else
|
||||
Syslog('+', " uses: %s [%04X] version %d.%d", prodnm, hello2.product, majver, minver);
|
||||
Syslog('+', " system: %s",(char*)hello2.my_name);
|
||||
sprintf(history.system_name, "%s", hello2.my_name);
|
||||
history.system_name[36] = '\0';
|
||||
strncpy(history.system_name, hello2.my_name, 35);
|
||||
Syslog('+', " sysop: %s",(char*)hello2.sysop);
|
||||
sprintf(history.sysop, "%s", hello2.sysop);
|
||||
strncpy(history.sysop, hello2.sysop, 35);
|
||||
sprintf(history.location, "Somewhere");
|
||||
|
||||
free(prodnm);
|
||||
|
Reference in New Issue
Block a user