]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/whoami.c
ITS#4840 fix typo
[openldap] / libraries / libldap / whoami.c
index 498af5a180f869004197ce3b7c8b1b99c45444a9..f77ebb5069b5b6da6314acff0b9fba53034f1ab7 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -68,7 +68,7 @@ ldap_whoami( LDAP *ld,
        assert( LDAP_VALID( ld ) );
        assert( msgidp != NULL );
 
-       rc = ldap_extended_operation( ld, LDAP_EXOP_X_WHO_AM_I,
+       rc = ldap_extended_operation( ld, LDAP_EXOP_WHO_AM_I,
                NULL, sctrls, cctrls, msgidp );
 
        return rc;
@@ -88,7 +88,7 @@ ldap_whoami_s(
        rc = ldap_whoami( ld, sctrls, cctrls, &msgid );
        if ( rc != LDAP_SUCCESS ) return rc;
 
-       if ( ldap_result( ld, msgid, 1, (struct timeval *) NULL, &res ) == -1 ) {
+       if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res ) {
                return ld->ld_errno;
        }