Some fixes for FreeBSD crashes
This commit is contained in:
parent
6b3aca987f
commit
b04b54b3e1
@ -285,6 +285,7 @@ long Report(gr_list *ta, long filepos)
|
|||||||
int i, Total = 0;
|
int i, Total = 0;
|
||||||
unsigned long Size = 0;
|
unsigned long Size = 0;
|
||||||
long filepos1 = 0, filepos2, filepos3 = 0, finalpos = 0;
|
long filepos1 = 0, filepos2, filepos3 = 0, finalpos = 0;
|
||||||
|
time_t ftime;
|
||||||
|
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/toberep.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/toberep.data", getenv("MBSE_ROOT"));
|
||||||
@ -326,9 +327,18 @@ long Report(gr_list *ta, long filepos)
|
|||||||
* Report one newfile, first line.
|
* Report one newfile, first line.
|
||||||
*/
|
*/
|
||||||
fseek(fi, filepos1, SEEK_SET);
|
fseek(fi, filepos1, SEEK_SET);
|
||||||
MacroVars("slbkdt", "ssddss", T_File.Name, T_File.LName, T_File.Size, T_File.SizeKb, rfcdate(T_File.Fdate),
|
Syslog('-', "1");
|
||||||
To_Low(T_File.LDesc[0],newfiles.HiAscii));
|
ftime = T_File.Fdate;
|
||||||
|
// MacroVars("slbkdt", "ssddss", T_File.Name, T_File.LName, T_File.Size, T_File.SizeKb, /* rfcdate(ftime) */ " ",
|
||||||
|
// To_Low(T_File.LDesc[0],newfiles.HiAscii));
|
||||||
|
MacroVars("sl", "ss", T_File.Name, T_File.LName);
|
||||||
|
Syslog('-', "2");
|
||||||
|
MacroVars("bk", "dd", T_File.Size, T_File.SizeKb);
|
||||||
|
Syslog('-', "3");
|
||||||
|
MacroVars("dt", "ss", rfcdate(ftime), To_Low(T_File.LDesc[0],newfiles.HiAscii));
|
||||||
|
Syslog('-', "4");
|
||||||
Msg_Macro(fi);
|
Msg_Macro(fi);
|
||||||
|
Syslog('-', "5");
|
||||||
filepos2 = ftell(fi);
|
filepos2 = ftell(fi);
|
||||||
/*
|
/*
|
||||||
* Extra description lines follow
|
* Extra description lines follow
|
||||||
|
@ -53,7 +53,7 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
|||||||
char flavor;
|
char flavor;
|
||||||
faddr *dest, *route, *Fa;
|
faddr *dest, *route, *Fa;
|
||||||
int i, z, n;
|
int i, z, n;
|
||||||
time_t now;
|
time_t now, ftime;
|
||||||
fa_list *tmp;
|
fa_list *tmp;
|
||||||
|
|
||||||
if (!SearchNode(Node)) {
|
if (!SearchNode(Node)) {
|
||||||
@ -135,10 +135,17 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
|||||||
if (nodes.Message) {
|
if (nodes.Message) {
|
||||||
if ((net = SendMgrMail(fido2faddr(Node), CFG.ct_KeepMgr, TRUE, (char *)"Filemgr", subject, NULL)) != NULL) {
|
if ((net = SendMgrMail(fido2faddr(Node), CFG.ct_KeepMgr, TRUE, (char *)"Filemgr", subject, NULL)) != NULL) {
|
||||||
if ((fi = OpenMacro("forward.tic", nodes.Language, FALSE)) != NULL) {
|
if ((fi = OpenMacro("forward.tic", nodes.Language, FALSE)) != NULL) {
|
||||||
MacroVars("abcdfghijmns", "ssdssddsssss", TIC.TicIn.Area, tic.Comment, TIC.FileCost, fgroup.Comment,
|
ftime = TIC.FileDate;
|
||||||
TIC.TicIn.FullName, TIC.FileSize, TIC.FileSize / 1024,
|
MacroVars("ab", "ss", TIC.TicIn.Area, tic.Comment);
|
||||||
TIC.TicIn.Crc, TIC.TicIn.Origin, rfcdate(TIC.FileDate),
|
MacroVars("cd", "ds", TIC.FileCost, fgroup.Comment);
|
||||||
TIC.TicIn.Desc, nodes.Sysop);
|
MacroVars("fg", "sd", TIC.TicIn.FullName, TIC.FileSize);
|
||||||
|
MacroVars("hi", "ds", TIC.FileSize / 1024, TIC.TicIn.Crc);
|
||||||
|
MacroVars("jm", "ss", TIC.TicIn.Origin, rfcdate(ftime));
|
||||||
|
MacroVars("ns", "ss", TIC.TicIn.Desc, nodes.Sysop);
|
||||||
|
// MacroVars("abcdfghijmns", "ssdssddsssss", TIC.TicIn.Area, tic.Comment, TIC.FileCost, fgroup.Comment,
|
||||||
|
// TIC.TicIn.FullName, TIC.FileSize, TIC.FileSize / 1024,
|
||||||
|
// TIC.TicIn.Crc, TIC.TicIn.Origin, rfcdate(ftime),
|
||||||
|
// TIC.TicIn.Desc, nodes.Sysop);
|
||||||
if (TIC.SendOrg)
|
if (TIC.SendOrg)
|
||||||
MacroVars("e", "s", TIC.RealName);
|
MacroVars("e", "s", TIC.RealName);
|
||||||
else
|
else
|
||||||
|
@ -179,7 +179,8 @@ int LoadTic(char *inb, char *tfn)
|
|||||||
memset(&T_File, 0, sizeof(T_File));
|
memset(&T_File, 0, sizeof(T_File));
|
||||||
|
|
||||||
sprintf(TIC.Inbound, "%s", inb);
|
sprintf(TIC.Inbound, "%s", inb);
|
||||||
strncpy(TIC.TicName, tfn, 12);
|
// strncpy(TIC.TicName, tfn, 12);
|
||||||
|
sprintf(TIC.TicName, "%s", tfn);
|
||||||
|
|
||||||
chdir(inb);
|
chdir(inb);
|
||||||
if ((tfp = fopen(tfn, "r")) == NULL) {
|
if ((tfp = fopen(tfn, "r")) == NULL) {
|
||||||
|
Reference in New Issue
Block a user