Possible fixes for nodes database corruption
This commit is contained in:
parent
4787e41b90
commit
33eb0cc7e2
@ -763,6 +763,11 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
Area[i]=toupper(Area[i]);
|
Area[i]=toupper(Area[i]);
|
||||||
|
|
||||||
if (!SearchMsgs(Area)) {
|
if (!SearchMsgs(Area)) {
|
||||||
|
/*
|
||||||
|
* Close noderecord, autocreate will destroy it.
|
||||||
|
*/
|
||||||
|
UpdateNode();
|
||||||
|
|
||||||
Syslog('m', " Area not found, trying to create");
|
Syslog('m', " Area not found, trying to create");
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
|
||||||
|
@ -82,7 +82,8 @@ int create_msgarea(char *marea, faddr *p_from)
|
|||||||
* 0 - All Seems Well
|
* 0 - All Seems Well
|
||||||
* 1 - Some error
|
* 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)
|
int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
|
||||||
{
|
{
|
||||||
|
@ -205,6 +205,7 @@ int importmsg(faddr *p_from, faddr *f, faddr *t, char *orig, char *subj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!SearchMsgs(marea)) {
|
if (!SearchMsgs(marea)) {
|
||||||
|
UpdateNode();
|
||||||
Syslog('m', "Unknown echo area %s", marea);
|
Syslog('m', "Unknown echo area %s", marea);
|
||||||
if (!create_msgarea(marea, p_from)) {
|
if (!create_msgarea(marea, p_from)) {
|
||||||
WriteError("Create echomail area %s failed", marea);
|
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);
|
free(buf);
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
SearchNode(Link.aka);
|
||||||
if (!SearchMsgs(marea)) {
|
if (!SearchMsgs(marea)) {
|
||||||
WriteError("Unknown echo area %s", marea);
|
WriteError("Unknown echo area %s", marea);
|
||||||
echo_bad++;
|
echo_bad++;
|
||||||
|
Reference in New Issue
Block a user