Fixed area creation case sensitive problem

This commit is contained in:
Michiel Broek
2004-02-29 13:07:42 +00:00
parent 2f83de2991
commit 5e308967eb
7 changed files with 23 additions and 17 deletions

View File

@@ -118,14 +118,11 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f)
while ((*desc == ' ') || (*desc == '\t'))
desc++;
if (!strcmp(desc, fgroup.Comment)) {
// Syslog('f', "Start of group \"%s\" found", desc);
while (fgets(buf, 4096, ap)) {
if (!strncasecmp(buf, "Area ", 5)) {
// Syslog('f', "Area: %s", buf);
tag = strtok(buf, "\t \r\n\0");
tag = strtok(NULL, "\t \r\n\0");
// Syslog('f', "Tag: \"%s\"", tag);
if (!strcmp(tag, Area)) {
if (!strcasecmp(tag, Area)) {
raid = strtok(NULL, "\t \r\n\0");
flow = strtok(NULL, "\t \r\n\0");
p = strtok(NULL, "\r\n\0");
@@ -141,7 +138,6 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f)
/*
* All entries in group are seen, the area wasn't there.
*/
// Syslogp('f', buf);
break;
}
}
@@ -163,7 +159,7 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f)
desc = p;
while ((*desc == ' ') || (*desc == '\t'))
desc++;
if (strcmp(tag, Area) == 0) {
if (strcasecmp(tag, Area) == 0) {
Syslog('f', "Found tag \"%s\" desc \"%s\"", tag, desc);
Found = TRUE;
break;
@@ -179,6 +175,12 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f)
return 1;
}
/*
* Some peaple write taglists with lowercase tagnames...
*/
for (i = 0; i < strlen(tag); i++)
tag[i] = toupper(tag[i]);
Syslog('m', "Found tag \"%s\" desc \"%s\"", tag, desc);
/*
@@ -186,7 +188,7 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f)
* If needed, connect at uplink.
*/
if (SendUplink) {
sprintf(temp, "+%s", Area);
sprintf(temp, "+%s", tag);
From = fido2faddr(fgroup.UseAka);
To = fido2faddr(fgroup.UpLink);

View File

@@ -111,7 +111,13 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
desc = p;
while ((*desc == ' ') || (*desc == '\t'))
desc++;
if (strcmp(tag, Area) == 0) {
if (strcasecmp(tag, Area) == 0) {
/*
* Make sure the tag is uppercase
*/
for (i = 0; i < strlen(tag); i++)
tag[i] = toupper(tag[i]);
Syslog('m', "Found tag \"%s\" desc \"%s\"", tag, desc);
/*
@@ -119,7 +125,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
* If needed, connect at uplink.
*/
if (SendUplink) {
sprintf(temp, "+%s", Area);
sprintf(temp, "+%s", tag);
From = fido2faddr(mgroup.UseAka);
To = fido2faddr(mgroup.UpLink);
if (UplinkRequest(To, From, FALSE, temp)) {