Some small fixes
This commit is contained in:
parent
1c7d22ed1a
commit
cc2f2b1c34
@ -57,7 +57,7 @@ int attach(faddr noden, char *ofile, int mode, char flavor)
|
||||
/*
|
||||
* Attach file to .flo
|
||||
*
|
||||
* Not that mbcico when connected to a node opens the file "r+",
|
||||
* Note that mbcico when connected to a node opens the file "r+",
|
||||
* locks it with fcntl(F_SETLK), F_RDLCK, whence=0, start=0L, len=0L.
|
||||
* It seems that this lock is released after the files in the .flo
|
||||
* files are send. I don't know what will happen if we add entries
|
||||
|
@ -121,13 +121,15 @@ int pack_queue(char *name)
|
||||
flavor = 'h';
|
||||
} else {
|
||||
WriteError("Archiver ZIP not found");
|
||||
if (noden.domain)
|
||||
free(noden.domain);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate ARCmail filename and .PKT filename,
|
||||
*/
|
||||
arcfile = calloc(128, sizeof(char));
|
||||
arcfile = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(arcfile, "%s", arcname(&noden, nodes.Aka[0].zone, nodes.ARCmailCompat));
|
||||
pktfile = calloc(40, sizeof(char));
|
||||
sprintf(pktfile, "%08lx.pkt", sequencer());
|
||||
@ -390,7 +392,7 @@ void packmail()
|
||||
colour(3, 0);
|
||||
}
|
||||
|
||||
temp = calloc(129, sizeof(char));
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(temp, "%s/tmp", getenv("MBSE_ROOT"));
|
||||
|
||||
if (chdir(temp) == -1) {
|
||||
|
@ -87,7 +87,7 @@ void ScanMail(int DoAll)
|
||||
DoFull = TRUE;
|
||||
} else {
|
||||
scanned = 0;
|
||||
Fname = calloc(128, sizeof(char));
|
||||
Fname = calloc(PATH_MAX, sizeof(char));
|
||||
temp = calloc(128, sizeof(char));
|
||||
|
||||
sprintf(Fname, "%s/tmp/echomail.jam", getenv("MBSE_ROOT"));
|
||||
@ -139,7 +139,7 @@ void ScanMail(int DoAll)
|
||||
|
||||
void ScanFull()
|
||||
{
|
||||
char sAreas[81], sbe[128];
|
||||
char *sAreas, sbe[128];
|
||||
FILE *pAreas;
|
||||
long arearec = 0, sysstart, nextstart;
|
||||
unsigned long Total, Number;
|
||||
@ -157,6 +157,7 @@ void ScanFull()
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
sAreas = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(sAreas, "%s/etc/users.data", getenv("MBSE_ROOT"));
|
||||
if ((pAreas = fopen(sAreas, "r")) != NULL) {
|
||||
fread(&usrconfighdr, sizeof(usrconfighdr), 1, pAreas);
|
||||
@ -214,8 +215,10 @@ void ScanFull()
|
||||
sprintf(sAreas, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||
if ((pAreas = fopen(sAreas, "r")) == NULL) {
|
||||
WriteError("Can't open %s", sAreas);
|
||||
free(sAreas);
|
||||
return;
|
||||
}
|
||||
free(sAreas);
|
||||
fread(&msgshdr, sizeof(msgshdr), 1, pAreas);
|
||||
|
||||
while (fread(&msgs, msgshdr.recsize, 1, pAreas) == 1) {
|
||||
@ -331,7 +334,7 @@ void ScanFull()
|
||||
|
||||
void ScanOne(char *path, unsigned long MsgNum)
|
||||
{
|
||||
char sAreas[81], sbe[128];
|
||||
char *sAreas, sbe[128];
|
||||
FILE *pAreas;
|
||||
long sysstart;
|
||||
unsigned long Total, Area = 0;
|
||||
@ -368,11 +371,14 @@ void ScanOne(char *path, unsigned long MsgNum)
|
||||
return;
|
||||
}
|
||||
|
||||
sAreas = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(sAreas, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||
if ((pAreas = fopen(sAreas, "r")) == NULL) {
|
||||
WriteError("Can't open %s", sAreas);
|
||||
free(sAreas);
|
||||
return;
|
||||
}
|
||||
free(sAreas);
|
||||
fread(&msgshdr, sizeof(msgshdr), 1, pAreas);
|
||||
|
||||
/*
|
||||
|
@ -1091,6 +1091,17 @@ int EditMsgRec(int Area)
|
||||
if (strlen(msgs.Group)) {
|
||||
msgs.Aka = mgroup.UseAka;
|
||||
msgs.Active = TRUE;
|
||||
msgs.DaysOld = CFG.defdays;
|
||||
msgs.MaxMsgs = CFG.defmsgs;
|
||||
msgs.UsrDelete = mgroup.UsrDelete;
|
||||
msgs.RDSec = mgroup.RDSec;
|
||||
msgs.WRSec = mgroup.WRSec;
|
||||
msgs.SYSec = mgroup.SYSec;
|
||||
msgs.Aliases = mgroup.Aliases;
|
||||
msgs.NetReply = mgroup.NetReply;
|
||||
msgs.Quotes = mgroup.Quotes;
|
||||
msgs.MaxArticles = CFG.maxarticles;
|
||||
|
||||
/*
|
||||
* If there is an uplink defined in the group,
|
||||
* and the first connected system is empty,
|
||||
|
Reference in New Issue
Block a user