Possible fixes for nodes database corruption

This commit is contained in:
Michiel Broek 2002-03-15 21:16:16 +00:00
parent 4787e41b90
commit 33eb0cc7e2
3 changed files with 9 additions and 1 deletions

View File

@ -763,6 +763,11 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
Area[i]=toupper(Area[i]);
if (!SearchMsgs(Area)) {
/*
* Close noderecord, autocreate will destroy it.
*/
UpdateNode();
Syslog('m', " Area not found, trying to create");
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));

View File

@ -82,7 +82,8 @@ int create_msgarea(char *marea, faddr *p_from)
* 0 - All Seems Well
* 1 - Some error
*
* The current nodes record may be destroyed after this!
* The current nodes record may be destroyed after this,
* make sure it is saved.
*/
int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
{

View File

@ -205,6 +205,7 @@ int importmsg(faddr *p_from, faddr *f, faddr *t, char *orig, char *subj,
}
if (!SearchMsgs(marea)) {
UpdateNode();
Syslog('m', "Unknown echo area %s", marea);
if (!create_msgarea(marea, p_from)) {
WriteError("Create echomail area %s failed", marea);
@ -215,6 +216,7 @@ int importmsg(faddr *p_from, faddr *f, faddr *t, char *orig, char *subj,
free(buf);
return 4;
}
SearchNode(Link.aka);
if (!SearchMsgs(marea)) {
WriteError("Unknown echo area %s", marea);
echo_bad++;