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
|
* 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.
|
* 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
|
* 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
|
* 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';
|
flavor = 'h';
|
||||||
} else {
|
} else {
|
||||||
WriteError("Archiver ZIP not found");
|
WriteError("Archiver ZIP not found");
|
||||||
|
if (noden.domain)
|
||||||
|
free(noden.domain);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate ARCmail filename and .PKT filename,
|
* 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));
|
sprintf(arcfile, "%s", arcname(&noden, nodes.Aka[0].zone, nodes.ARCmailCompat));
|
||||||
pktfile = calloc(40, sizeof(char));
|
pktfile = calloc(40, sizeof(char));
|
||||||
sprintf(pktfile, "%08lx.pkt", sequencer());
|
sprintf(pktfile, "%08lx.pkt", sequencer());
|
||||||
@ -390,7 +392,7 @@ void packmail()
|
|||||||
colour(3, 0);
|
colour(3, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = calloc(129, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/tmp", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/tmp", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
if (chdir(temp) == -1) {
|
if (chdir(temp) == -1) {
|
||||||
|
@ -87,7 +87,7 @@ void ScanMail(int DoAll)
|
|||||||
DoFull = TRUE;
|
DoFull = TRUE;
|
||||||
} else {
|
} else {
|
||||||
scanned = 0;
|
scanned = 0;
|
||||||
Fname = calloc(128, sizeof(char));
|
Fname = calloc(PATH_MAX, sizeof(char));
|
||||||
temp = calloc(128, sizeof(char));
|
temp = calloc(128, sizeof(char));
|
||||||
|
|
||||||
sprintf(Fname, "%s/tmp/echomail.jam", getenv("MBSE_ROOT"));
|
sprintf(Fname, "%s/tmp/echomail.jam", getenv("MBSE_ROOT"));
|
||||||
@ -139,7 +139,7 @@ void ScanMail(int DoAll)
|
|||||||
|
|
||||||
void ScanFull()
|
void ScanFull()
|
||||||
{
|
{
|
||||||
char sAreas[81], sbe[128];
|
char *sAreas, sbe[128];
|
||||||
FILE *pAreas;
|
FILE *pAreas;
|
||||||
long arearec = 0, sysstart, nextstart;
|
long arearec = 0, sysstart, nextstart;
|
||||||
unsigned long Total, Number;
|
unsigned long Total, Number;
|
||||||
@ -157,6 +157,7 @@ void ScanFull()
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sAreas = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(sAreas, "%s/etc/users.data", getenv("MBSE_ROOT"));
|
sprintf(sAreas, "%s/etc/users.data", getenv("MBSE_ROOT"));
|
||||||
if ((pAreas = fopen(sAreas, "r")) != NULL) {
|
if ((pAreas = fopen(sAreas, "r")) != NULL) {
|
||||||
fread(&usrconfighdr, sizeof(usrconfighdr), 1, pAreas);
|
fread(&usrconfighdr, sizeof(usrconfighdr), 1, pAreas);
|
||||||
@ -214,8 +215,10 @@ void ScanFull()
|
|||||||
sprintf(sAreas, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
sprintf(sAreas, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||||
if ((pAreas = fopen(sAreas, "r")) == NULL) {
|
if ((pAreas = fopen(sAreas, "r")) == NULL) {
|
||||||
WriteError("Can't open %s", sAreas);
|
WriteError("Can't open %s", sAreas);
|
||||||
|
free(sAreas);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
free(sAreas);
|
||||||
fread(&msgshdr, sizeof(msgshdr), 1, pAreas);
|
fread(&msgshdr, sizeof(msgshdr), 1, pAreas);
|
||||||
|
|
||||||
while (fread(&msgs, msgshdr.recsize, 1, pAreas) == 1) {
|
while (fread(&msgs, msgshdr.recsize, 1, pAreas) == 1) {
|
||||||
@ -331,7 +334,7 @@ void ScanFull()
|
|||||||
|
|
||||||
void ScanOne(char *path, unsigned long MsgNum)
|
void ScanOne(char *path, unsigned long MsgNum)
|
||||||
{
|
{
|
||||||
char sAreas[81], sbe[128];
|
char *sAreas, sbe[128];
|
||||||
FILE *pAreas;
|
FILE *pAreas;
|
||||||
long sysstart;
|
long sysstart;
|
||||||
unsigned long Total, Area = 0;
|
unsigned long Total, Area = 0;
|
||||||
@ -368,11 +371,14 @@ void ScanOne(char *path, unsigned long MsgNum)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sAreas = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(sAreas, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
sprintf(sAreas, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||||
if ((pAreas = fopen(sAreas, "r")) == NULL) {
|
if ((pAreas = fopen(sAreas, "r")) == NULL) {
|
||||||
WriteError("Can't open %s", sAreas);
|
WriteError("Can't open %s", sAreas);
|
||||||
|
free(sAreas);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
free(sAreas);
|
||||||
fread(&msgshdr, sizeof(msgshdr), 1, pAreas);
|
fread(&msgshdr, sizeof(msgshdr), 1, pAreas);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1091,6 +1091,17 @@ int EditMsgRec(int Area)
|
|||||||
if (strlen(msgs.Group)) {
|
if (strlen(msgs.Group)) {
|
||||||
msgs.Aka = mgroup.UseAka;
|
msgs.Aka = mgroup.UseAka;
|
||||||
msgs.Active = TRUE;
|
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,
|
* If there is an uplink defined in the group,
|
||||||
* and the first connected system is empty,
|
* and the first connected system is empty,
|
||||||
|
Reference in New Issue
Block a user