From: Kurt Zeilenga Date: Sun, 25 Oct 1998 16:48:16 +0000 (+0000) Subject: dn was computed after it was needed. X-Git-Tag: OPENLDAP_REL_ENG_1_0_3~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=507053350d5f150afd1c2156541f822a2ef35c99;p=thirdparty%2Fopenldap.git dn was computed after it was needed. --- diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index 7f74fbf57c..6d1ed89bf1 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -10,9 +10,6 @@ * is provided ``as is'' without express or implied warranty. */ -#include "lber.h" -#include "ldap.h" -#include "disptmpl.h" #include #include #include @@ -30,13 +27,18 @@ #ifdef aix #include #endif /* aix */ -#include "portable.h" -#include "ldapconfig.h" #ifdef USE_SYSCONF #include #endif /* USE_SYSCONF */ +#include "lber.h" +#include "ldap.h" +#include "disptmpl.h" + +#include "portable.h" +#include "ldapconfig.h" + int debug; int dosyslog; int inetd; @@ -156,6 +158,14 @@ char **argv; dtblsize = getdtablesize(); #endif /* USE_SYSCONF */ +#ifdef FD_SETSIZE + if ( dtblsize > FD_SETSIZE ) { + dtblsize = FD_SETSIZE; + } +#endif /* FD_SETSIZE*/ + + + #ifdef GO500GW_HOSTNAME strcpy( myhost, GO500GW_HOSTNAME ); #else @@ -766,15 +776,16 @@ char *query; e = ldap_first_entry( ld, res ); oc = ldap_get_values( ld, e, "objectClass" ); - if ( isnonleaf( ld, oc, dn ) ) { - dn = ldap_get_dn( ld, e ); + dn = ldap_get_dn( ld, e ); + if ( isnonleaf( ld, oc, dn ) ) { rc = do_menu( ld, fp, dn ); free( dn ); return( rc ); } + free( dn ); ldap_value_free( oc ); } diff --git a/clients/gopher/setproctitle.c b/clients/gopher/setproctitle.c index 26b42c0cee..c7f832604d 100644 --- a/clients/gopher/setproctitle.c +++ b/clients/gopher/setproctitle.c @@ -21,6 +21,7 @@ int Argc; /* original argc */ /* VARARGS */ setproctitle( fmt, a, b, c ) char *fmt; +char *a, *b, *c; { static char *endargv = (char *)0; char *s;