Changed error message in AddMsgHdr()

This commit is contained in:
Michiel Broek 2002-03-23 10:37:39 +00:00
parent 59a599a61f
commit 8ffd82f9f2
2 changed files with 13 additions and 1 deletions

View File

@ -4671,6 +4671,7 @@ v0.33.20 10-Feb-2002
ticfiles setup to forward file to and there was no noderecord.
When a ticfile was received while our aka is in the path, the
bad tic counter wasn't increased.
Made error message in AddMsgHdr function more clear.
mball:
Will not crash anymore when it needs more then 10 minutes to

View File

@ -199,7 +199,18 @@ int AddMsgHdr(FILE *fp, faddr *f, faddr *t, int flags, int cost, time_t date, ch
if ((tname == NULL) || (strlen(tname) > 36) ||
(fname == NULL) || (strlen(fname) > 36) ||
(subj == NULL) || (strlen(subj) > 72)) {
WriteError("AddMsgHdr() error in To name, From name or Subject field");
if (tname == NULL)
WriteError("AddMsgHdr() error, To name is NULL");
else if (strlen(tname) > 36)
WriteError("AddMsgHdr() error, To name length %d", strlen(tname));
if (fname == NULL)
WriteError("AddMsgHdr() error, From name is NULL");
else if (strlen(fname) > 36)
WriteError("AddMsgHdr() error, From name length %d", strlen(fname));
if (subj == NULL)
WriteError("AddMsgHdr() error, Subject is NULL");
else if (strlen(subj) > 72)
WriteError("AddMsgHdr() error, Subject length %d", strlen(subj));
return 1;
}