From 2547abcf213dfaa095268571162f6ed5bb448c9b Mon Sep 17 00:00:00 2001 From: bchristiansen Date: Wed, 21 Jul 2010 21:27:06 +0000 Subject: [PATCH] Made showgrid's, and other's, arguments case-insensitive. (David Chin) git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@135 3f5042e3-fb1d-0410-be18-d6ca2573e517 --- CHANGELOG | 1 + src/server/OServer.c | 12 ++++++------ src/server/OUserI.c | 14 +++++++------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4d6a9de..eeddffb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Maui 3.3.1 - Fixed issue where hostlist was being overwritten resulting in broken $PBS_NODEFILE. (Alexis Cousein) - Fixed issue where users could set system priority on their own jobs. (Bas van der Vlies) + - Made showgrid's, and other's, arguments case-insensitive. (David Chin) Maui 3.3 - Fixed configure script. Was putting RMCFG[name] TYPE=PBS@RMNMHOST@. diff --git a/src/server/OServer.c b/src/server/OServer.c index d952fe8..75c7b36 100644 --- a/src/server/OServer.c +++ b/src/server/OServer.c @@ -57,15 +57,15 @@ int ServerSetSignalHandlers() { act.sa_handler = (void(*)(int))SIG_DFL; } - else if (!strcmp(ptr,"TRAP") || !strcmp(ptr,"trap")) + else if (!strcasecmp(ptr,"trap")) { act.sa_handler = (void(*)(int))CrashMode; } - else if (!strcmp(ptr,"IGNORE") || !strcmp(ptr,"ignore")) + else if (!strcasecmp(ptr,"ignore")) { act.sa_handler = (void(*)(int))SIG_IGN; } - else if (!strcmp(ptr,"DIE") || !strcmp(ptr,"die")) + else if (!strcasecmp(ptr,"die")) { act.sa_handler = (void(*)(int))SIG_DFL; } @@ -93,15 +93,15 @@ int ServerSetSignalHandlers() { act.sa_handler = (void(*)(int))SIG_DFL; } - else if (!strcmp(ptr,"TRAP") || !strcmp(ptr,"trap")) + else if (!strcasecmp(ptr,"trap")) { act.sa_handler = (void(*)(int))CrashMode; } - else if (!strcmp(ptr,"IGNORE") || !strcmp(ptr,"ignore")) + else if (!strcasecmp(ptr,"ignore")) { act.sa_handler = (void(*)(int))SIG_IGN; } - else if (!strcmp(ptr,"DIE") || !strcmp(ptr,"die")) + else if (!strcasecmp(ptr,"die")) { act.sa_handler = (void(*)(int))SIG_DFL; } diff --git a/src/server/OUserI.c b/src/server/OUserI.c index d3a8b79..3545599 100644 --- a/src/server/OUserI.c +++ b/src/server/OUserI.c @@ -291,14 +291,14 @@ int UIProcessCommand( if (MSched.AdminHost[index][0] == '\0') break; - if (!strcmp(MSched.AdminHost[index],S->Host)) + if (!strcasecmp(MSched.AdminHost[index],S->Host)) { hostcheck = TRUE; break; } - if (!strcmp(MSched.AdminHost[index],"ALL")) + if (!strcasecmp(MSched.AdminHost[index],"ALL")) { hostcheck = TRUE; @@ -565,7 +565,7 @@ int SetJobUserPrio( if (!(FLAGS & ((1 << fAdmin1) | (1 << fAdmin2)))) { - if (strcmp(J->Cred.U->Name,Auth) != 0) + if (strcasecmp(J->Cred.U->Name,Auth) != 0) { DBG(2,fUI) DPrint("INFO: user %s is not authorized to set user priority on job %s\n", Auth, @@ -618,7 +618,7 @@ int UIShowGrid( for (sindex = 0;MStatType[sindex] != 0;sindex++) { - if (!strcmp(MStatType[sindex],GStat)) + if (!strcasecmp(MStatType[sindex],GStat)) break; } /* END for (sindex) */ @@ -777,7 +777,7 @@ int ShowBackfillWindow( { for (mindex = 0;MComp[mindex] != NULL;mindex++) { - if (!strcmp(MComp[mindex],MemCmp)) + if (!strcasecmp(MComp[mindex],MemCmp)) break; } @@ -858,9 +858,9 @@ int ShowBackfillWindow( (BFNodeCount >= RequiredNodes) && (BFProcCount >= RequiredProcs)) { - if (strcmp(P->Name,CurrentPName) != 0) + if (strcasecmp(P->Name,CurrentPName) != 0) { - if ((strcmp(CurrentPName,GLOBAL_MPARNAME)) && (index == 0)) + if ((strcasecmp(CurrentPName,GLOBAL_MPARNAME)) && (index == 0)) { sprintf(Buffer,"%sno %s available\n", Buffer,