mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
finishing touches. think its ready for integration now.
svn:r42
This commit is contained in:
parent
3ee59f2325
commit
aaca91109f
@ -8,6 +8,9 @@
|
|||||||
/*
|
/*
|
||||||
* Changes :
|
* Changes :
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.9 2002/07/11 19:03:44 montrose
|
||||||
|
* finishing touches. think its ready for integration now.
|
||||||
|
*
|
||||||
* Revision 1.8 2002/07/11 18:38:15 montrose
|
* Revision 1.8 2002/07/11 18:38:15 montrose
|
||||||
* added new option GlobalRole to getoptions()
|
* added new option GlobalRole to getoptions()
|
||||||
*
|
*
|
||||||
@ -128,6 +131,7 @@ RETURN VALUE: 0 on success, non-zero on error
|
|||||||
/* assign default option values */
|
/* assign default option values */
|
||||||
|
|
||||||
bzero(options,sizeof(or_options_t));
|
bzero(options,sizeof(or_options_t));
|
||||||
|
options->LogLevel = "debug";
|
||||||
options->loglevel = LOG_DEBUG;
|
options->loglevel = LOG_DEBUG;
|
||||||
options->CoinWeight = 0.8;
|
options->CoinWeight = 0.8;
|
||||||
options->GlobalRole = ROLE_OR_LISTEN | ROLE_OR_CONNECT_ALL | ROLE_OP_LISTEN | ROLE_AP_LISTEN;
|
options->GlobalRole = ROLE_OR_LISTEN | ROLE_OR_CONNECT_ALL | ROLE_OP_LISTEN | ROLE_AP_LISTEN;
|
||||||
@ -147,7 +151,21 @@ RETURN VALUE: 0 on success, non-zero on error
|
|||||||
log(LOG_ERR, "%s: Unable to open configuration file.\n", ConfigFile);
|
log(LOG_ERR, "%s: Unable to open configuration file.\n", ConfigFile);
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
if ( Verbose ) /* display options upon user request */
|
code = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
poptPrintUsage(optCon, stderr, 0);
|
||||||
|
log(LOG_ERR, "%s: %s\n", poptBadOption(optCon, POPT_BADOPTION_NOALIAS), poptStrerror(code));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
poptFreeContext(optCon);
|
||||||
|
|
||||||
|
if ( code ) return code; /* return here if we encountered any problems */
|
||||||
|
|
||||||
|
/* Display options upon user request */
|
||||||
|
|
||||||
|
if ( Verbose )
|
||||||
{
|
{
|
||||||
printf("LogLevel=%s, GlobalRole=%d\n",
|
printf("LogLevel=%s, GlobalRole=%d\n",
|
||||||
options->LogLevel,
|
options->LogLevel,
|
||||||
@ -163,15 +181,6 @@ RETURN VALUE: 0 on success, non-zero on error
|
|||||||
options->MaxConn,
|
options->MaxConn,
|
||||||
options->TrafficShaping);
|
options->TrafficShaping);
|
||||||
}
|
}
|
||||||
code = 0;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
poptPrintUsage(optCon, stderr, 0);
|
|
||||||
log(LOG_ERR, "%s: %s\n", poptBadOption(optCon, POPT_BADOPTION_NOALIAS), poptStrerror(code));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
poptFreeContext(optCon);
|
|
||||||
|
|
||||||
/* Validate options */
|
/* Validate options */
|
||||||
|
|
||||||
@ -199,8 +208,6 @@ RETURN VALUE: 0 on success, non-zero on error
|
|||||||
code = -1;
|
code = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
options->loglevel = LOG_DEBUG; /* default value */
|
|
||||||
|
|
||||||
if ( options->RouterFile == NULL )
|
if ( options->RouterFile == NULL )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user