cvs: /php3/functions ldap.c

From: Date: Sun, 29 Aug 1999 00:50:52 +0000
Subject: cvs: /php3/functions ldap.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-10319@lists.php.net to get a copy of this message
jim Sat Aug 28 20:50:52 1999 EDT Modified files: /php3/functions ldap.c Log: Some more. This could probably be done better. Index: php3/functions/ldap.c diff -u php3/functions/ldap.c:1.71 php3/functions/ldap.c:1.72 --- php3/functions/ldap.c:1.71 Sat Aug 28 20:49:34 1999 +++ php3/functions/ldap.c Sat Aug 28 20:50:52 1999 @@ -30,7 +30,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ldap.c,v 1.71 1999/08/29 00:49:34 jim Exp $ */ +/* $Id: ldap.c,v 1.72 1999/08/29 00:50:52 jim Exp $ */ #define IS_EXT_MODULE #if !PHP_31 && defined(THREAD_SAFE) #undef THREAD_SAFE @@ -318,7 +318,7 @@ php3_printf("<table>" "<tr><td>Total links:</td><td>%d/%s</td></tr>\n" - "<tr><td>RCS Version:</td><td>$Id: ldap.c,v 1.71 1999/08/29 00:49:34 jim Exp $</td></tr>\n" + "<tr><td>RCS Version:</td><td>$Id: ldap.c,v 1.72 1999/08/29 00:50:52 jim Exp $</td></tr>\n" #if HAVE_NSLDAP "<tr><td>SDK Version:</td><td>%f</td></tr>" "<tr><td>Highest LDAP Protocol Supported:</td><td>%f</td></tr>" @@ -581,6 +581,8 @@ RETURN_LONG(ldap->ld_errno); # endif +#else + RETURN_LONG(ldap_get_lderrno(ldap, NULL, NULL)); #endif RETURN_LONG(0); } @@ -744,11 +746,13 @@ if (ldap_search_s(ldap, ldap_base_dn, scope, ldap_filter, ldap_attrs, attrsonly, &ldap_result) != LDAP_SUCCESS) { #if !HAVE_NSLDAP -#if LDAP_API_VERSION > 2000 +# if LDAP_API_VERSION > 2000 php3_error(E_WARNING,"LDAP: Unable to perform the search: %s",ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); -#else +# else php3_error(E_WARNING, "LDAP: Unable to perform the search: %s", ldap_err2string(ldap->ld_errno)); -#endif +# endif +#else + php3_error(E_WARNING,"LDAP: Unable to perform the search: %s",ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); #endif RETVAL_FALSE; } else { @@ -1121,11 +1125,13 @@ if ((ldap_value = ldap_get_values(ldap, ldap_result_entry, attribute)) == NULL) { #if !HAVE_NSLDAP -#if LDAP_API_VERSION > 2000 +# if LDAP_API_VERSION > 2000 php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); -#else +# else php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", ldap_err2string(ldap->ld_errno)); -#endif +# endif +#else + php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); #endif RETURN_FALSE; } @@ -1174,11 +1180,13 @@ if ((ldap_value_len = ldap_get_values_len(ldap, ldap_result_entry, attribute)) == NULL) { #if !HAVE_NSLDAP -#if LDAP_API_VERSION > 2000 +# if LDAP_API_VERSION > 2000 php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); -#else +# else php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", ldap_err2string(ldap->ld_errno)); -#endif +# endif +#else + php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); #endif RETURN_FALSE; }

« previous php.dev (#10319) next »