Several small fixes and code cleanup

This commit is contained in:
Michiel Broek 2002-07-14 12:23:39 +00:00
parent 55ed2dd121
commit 1740ee0c84
4 changed files with 550 additions and 528 deletions

View File

@ -6,6 +6,7 @@ v0.35.03 06-Jul-2002
common.a:
Added nodelist override to the nodelist lookup function.
Added protection against emty rfc headers with only a space.
lang:
Corrected a spelling error in the Dutch language file.
@ -17,6 +18,10 @@ v0.35.03 06-Jul-2002
mbout:
Makes use of the node nodelist override settings.
mbfido:
Rollover now only sets IsDoing when it really does a date
rollover.
newuser:
Check for Unix accounts is now case sensitive.
Check existing usernames now also checks handles.

View File

@ -129,6 +129,10 @@ rfcmsg *parsrfc(FILE *fp)
Syslog('!', "Header line %s without key value", buffer);
cur->key = xstrcpy(buffer);
cur->val = xstrcpy((char *)" ");
} else if ((p=strchr(buffer,':')) && (p > buffer) && isspace(*(p+1))) { /* space past ':' */
Syslog('!', "Header line %s without key value (but with a Space)", buffer);
cur->key = xstrcpy(buffer);
cur->val = xstrcpy((char *)" ");
} else {
Syslog('M', "Non-header line: \"%s\"",buffer);
cur->key = xstrcpy((char *)"X-Body-Start");

View File

@ -77,7 +77,7 @@ FILE *OpenData(char *Name)
char *temp;
FILE *fp;
temp = calloc(128, sizeof(char));
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/%s", getenv("MBSE_ROOT"), Name);
if ((fp = fopen(temp, "r+")) == NULL) {
@ -106,7 +106,6 @@ void Rollover()
char *temp, *temp1;
struct _history history;
IsDoing("Date rollover");
Now = time(NULL);
t = localtime(&Now);
@ -140,6 +139,7 @@ void Rollover()
do_month = FALSE;
if (do_week || do_month) {
IsDoing("Date rollover");
Syslog('+', "Rollover nodes.data");
while (fread(&nodes, nodeshdr.recsize, 1, fp) == 1) {
@ -368,8 +368,8 @@ void Rollover()
fclose(fp);
}
temp = calloc(128, sizeof(char));
temp1 = calloc(128, sizeof(char));
temp = calloc(PATH_MAX, sizeof(char));
temp1 = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/var/mailer.hist", getenv("MBSE_ROOT"));
if ((fp = fopen(temp, "r"))) {
fread(&history, sizeof(history), 1, fp);

View File

@ -1694,7 +1694,6 @@ void BlueWave_Fetch()
Msg.Private = TRUE;
if (msgs.MsgKinds == PRIVATE)
Msg.Private = TRUE;
// Msg.Written = Upr.unix_date;
Msg.Written = Upr.unix_date - (gmt_offset((time_t)0) * 60);
Msg.Arrived = time(NULL) - (gmt_offset((time_t)0) * 60);
Msg.Local = TRUE;
@ -2231,6 +2230,8 @@ void OLR_DownQWK(void)
if ((mf = fopen(Temp, "r")) == NULL) {
WriteError("$Can't open %s", Temp);
fclose(fp);
free(Temp);
free(Work);
return;
}
fread(&msgshdr, sizeof(msgshdr), 1, mf);
@ -2240,6 +2241,8 @@ void OLR_DownQWK(void)
WriteError("$Can't open %s", Temp);
fclose(fp);
fclose(mf);
free(Temp);
free(Work);
return;
}
@ -2333,6 +2336,16 @@ void OLR_DownQWK(void)
fprintf(fp, "CONTROLNAME = MBSEQWK\n");
fprintf(fp, "CONTROLTYPE = ADD\n");
fprintf(fp, "CONTROLTYPE = DROP\n");
/*
* QWKE extensions
*/
// fprintf(fp, "CONTROLTYPE = MAXKEYWORDS 0\n");
// fprintf(fp, "CONTROLTYPE = MAXFILTERS 0\n");
// fprintf(fp, "CONTROLTYPE = MAXTWITS 0\n");
// fprintf(fp, "CONTROLTYPE = ALLOWATTACH\n");
// fprintf(fp, "CONTROLTYPE = ALLOWFILES\n");
// fprintf(fp, "CONTROLTYPE = ALLOWREQUESTS\n");
// fprintf(fp, "CONTROLTYPE = MAXREQUESTS 0\n");
fclose(fp);
}