Changed some auto area create logging

This commit is contained in:
Michiel Broek 2002-03-25 12:24:24 +00:00
parent 50f76b96bd
commit e6f0072fec

View File

@ -46,10 +46,11 @@ int create_msgarea(char *marea, faddr *p_from)
char *temp; char *temp;
FILE *gp; FILE *gp;
Syslog('m', "create_msgarea(%s)", marea);
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"));
if ((gp = fopen(temp, "r")) == NULL) { if ((gp = fopen(temp, "r")) == NULL) {
WriteError("$Can't open %s", temp); WriteError("Can't open %s", temp);
free(temp); free(temp);
return FALSE; return FALSE;
} }
@ -97,7 +98,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
Syslog('m', "Checking echogroup %s %s", mgroup.Name, mgroup.Comment); Syslog('m', "Checking echogroup %s %s", mgroup.Name, mgroup.Comment);
sprintf(temp, "%s/%s", CFG.alists_path , mgroup.AreaFile); sprintf(temp, "%s/%s", CFG.alists_path , mgroup.AreaFile);
if ((ap = fopen(temp, "r")) == NULL) { if ((ap = fopen(temp, "r")) == NULL) {
WriteError("$Can't open %s", temp); WriteError("Echogroup %s: area taglist %s not found", mgroup.Name, temp);
free(temp); free(temp);
return 1; return 1;
} }
@ -232,6 +233,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
} /* if (strcmp(tag, Area) == 0) */ } /* if (strcmp(tag, Area) == 0) */
} /* while (fgets(buf, 4096, ap)) */ } /* while (fgets(buf, 4096, ap)) */
Syslog('m', "Area %s not found in taglist", Area);
free(buf); free(buf);
fclose(ap); fclose(ap);
free(temp); free(temp);