Skip to content

Commit

Permalink
Remove conflicting undocumented options.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jun 19, 2013
1 parent 0cc3cd5 commit 3ac3830
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/XrdCms/XrdCmsConfig.cc
Expand Up @@ -207,22 +207,28 @@ int XrdCmsConfig::Configure1(int argc, char **argv, char *cfn)
//
opterr = 0; optind = 1;
if (argc > 1 && '-' == *argv[1])
while ((c=getopt(argc,argv,"imsw")) && ((unsigned char)c != 0xff))
while ((c=getopt(argc,argv,"iw")) && ((unsigned char)c != 0xff))
{ switch(c)
{
case 'i': immed = 1;
break;
case 'm': isManager = 1;
break;
case 's': isServer = 1;
break;
case 'w': immed = -1; // Backward compatability only
break;
default: buff[0] = '-'; buff[1] = optopt; buff[2] = '\0';
Say.Say("Config warning: unrecognized option,",buff,", ignored.");
Say.Say("Config warning: unrecognized option, ",buff,", ignored.");
}
}

// Accept a single parameter defining the overiding major role
//
if (optind < argc)
{ if (!strcmp(argv[optind], "manager")) isManager = 1;
else if (!strcmp(argv[optind], "server" )) isServer = 1;
else if (!strcmp(argv[optind], "super" )) isServer = isManager = 1;
else Say.Say("Config warning: unrecognized parameter, ",
argv[optind],", ignored.");
}

// Bail if no configuration file specified
//
inArgv = argv; inArgc = argc;
Expand Down Expand Up @@ -2471,7 +2477,7 @@ int XrdCmsConfig::xrole(XrdSysError *eDest, XrdOucStream &CFile)
// If the role was specified on the command line, issue warning and ignore this
//
if (isServer > 0 || isManager > 0 || isProxy > 0 || isPeer > 0)
{eDest->Say("Config warning: role directive over-ridden by command line options.");
{eDest->Say("Config warning: role directive over-ridden by command line.");
return 0;
}

Expand Down

0 comments on commit 3ac3830

Please sign in to comment.