Clean up a few globals

This commit is contained in:
Kurt Zeilenga 2001-12-27 02:03:57 +00:00
parent ef31250591
commit f9c2dc3701
6 changed files with 12 additions and 12 deletions

View file

@ -32,8 +32,6 @@ int ldap_syslog_level = LOG_DEBUG;
#endif
struct berval **default_referral = NULL;
int g_argc;
char **g_argv;
/*
* global variables that need mutex protection

View file

@ -27,7 +27,7 @@ static RETSIGTYPE wait4child( int sig );
#ifdef HAVE_NT_SERVICE_MANAGER
#define MAIN_RETURN(x) return
struct sockaddr_in bind_addr;
static struct sockaddr_in bind_addr;
void CommenceStartupProcessing( LPCTSTR serverName,
void(*stopper)(int));
@ -135,6 +135,9 @@ int main( int argc, char **argv )
#ifdef LOG_LOCAL4
int syslogUser = DEFAULT_SYSLOG_USER;
#endif
int g_argc = argc;
char **g_argv = argv;
#ifdef HAVE_NT_SERVICE_MANAGER
char *configfile = ".\\slapd.conf";
@ -151,8 +154,6 @@ int main( int argc, char **argv )
}
#endif
g_argc = argc;
g_argv = argv;
#ifdef HAVE_NT_SERVICE_MANAGER
{

View file

@ -953,7 +953,7 @@ LDAP_SLAPD_V (struct berval **) default_referral;
LDAP_SLAPD_V (char *) replogfile;
LDAP_SLAPD_V (const char) Versionstr[];
LDAP_SLAPD_V (struct slap_limits_set) deflimit;
LDAP_SLAPD_V (int) g_argc;
LDAP_SLAPD_V (slap_access_t) global_default_access;
LDAP_SLAPD_V (int) global_lastmod;
LDAP_SLAPD_V (int) global_idletimeout;
@ -982,7 +982,6 @@ LDAP_SLAPD_V (unsigned long) num_ops_initiated;
LDAP_SLAPD_V (char *) slapd_pid_file;
LDAP_SLAPD_V (char *) slapd_args_file;
LDAP_SLAPD_V (char **) g_argv;
LDAP_SLAPD_V (time_t) starttime;
/* use time(3) -- no mutex */

View file

@ -75,7 +75,9 @@ main( int argc, char **argv )
}
/* check backend */
if( select_backend( &e->e_nname, is_entry_referral(e), nosubs ) != be ) {
if( select_backend( &e->e_nname, is_entry_referral(e), nosubordinates )
!= be )
{
fprintf( stderr, "%s: line %d: "
"database (%s) not configured to hold \"%s\"\n",
progname, lineno,

View file

@ -24,7 +24,7 @@ char *conffile = SLAPD_DEFAULT_CONFIGFILE;
int truncatemode = 0;
int verbose = 0;
int continuemode = 0;
int nosubs = 0;
int nosubordinates = 0;
char *ldiffile = NULL;
FILE *ldiffp = NULL;
@ -233,7 +233,7 @@ slap_tool_init(
* entire context
*/
if (be->be_glueflags & SLAP_GLUE_INSTANCE)
nosubs = 1;
nosubordinates = 1;
} else if ( dbnum == -1 ) {
be = &backends[dbnum=0];
@ -241,7 +241,7 @@ slap_tool_init(
* glue subordinate, find the master.
*/
while (be->be_glueflags & SLAP_GLUE_SUBORDINATE) {
nosubs = 1;
nosubordinates = 1;
be++;
}

View file

@ -25,7 +25,7 @@ extern Backend *be;
extern int appendmode;
extern int verbose;
extern int continuemode;
extern int nosubs;
extern int nosubordinates;
extern char *ldiffile;
extern FILE *ldiffp;