]> git.sur5r.net Git - openldap/commitdiff
finish intermediate/partial merge
authorKurt Zeilenga <kurt@openldap.org>
Sat, 31 May 2003 05:08:25 +0000 (05:08 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 31 May 2003 05:08:25 +0000 (05:08 +0000)
libraries/libldap/extended.c

index dcb43d9abb7a3a722b6848ff610bfd8dbf54ab34..4fd921dd607c25d069bfffc0dcfd74dbabd986d5 100644 (file)
@@ -396,119 +396,3 @@ free_and_return:
        return LDAP_SUCCESS;
 }
 
-#if 0
-/* Parse an intermediate response result */
-int
-ldap_parse_intermediate_resp_result (
-       LDAP                    *ld,
-       LDAPMessage             *res,
-       char                    **retoidp,
-       struct berval           **retdatap,
-       int                     freeit )
-{
-       BerElement *ber;
-       ber_tag_t rc;
-       ber_tag_t tag;
-       ber_len_t len;
-       struct berval *resdata;
-       ber_int_t errcode;
-       char *resoid;
-
-       assert( ld != NULL );
-       assert( LDAP_VALID( ld ) );
-       assert( res != NULL );
-
-#ifdef NEW_LOGGING
-       LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_intermediate_resp_result\n", 0,0,0 );
-#else
-       Debug( LDAP_DEBUG_TRACE, "ldap_parse_intermediate_resp_result\n", 0, 0, 0 );
-#endif
-
-       if( ld->ld_version < LDAP_VERSION3 ) {
-               ld->ld_errno = LDAP_NOT_SUPPORTED;
-               return ld->ld_errno;
-       }
-
-       if( res->lm_msgtype != LDAP_RES_INTERMEDIATE_RESP ) {
-               ld->ld_errno = LDAP_PARAM_ERROR;
-               return ld->ld_errno;
-       }
-
-       if( retoidp != NULL ) *retoidp = NULL;
-       if( retdatap != NULL ) *retdatap = NULL;
-
-       if ( ld->ld_error ) {
-               LDAP_FREE( ld->ld_error );
-               ld->ld_error = NULL;
-       }
-
-       if ( ld->ld_matched ) {
-               LDAP_FREE( ld->ld_matched );
-               ld->ld_matched = NULL;
-       }
-
-       ber = ber_dup( res->lm_ber );
-
-       if ( ber == NULL ) {
-               ld->ld_errno = LDAP_NO_MEMORY;
-               return ld->ld_errno;
-       }
-
-       rc = ber_scanf( ber, "{iaa" /*}*/, &errcode,
-               &ld->ld_matched, &ld->ld_error );
-
-       if( rc == LBER_ERROR ) {
-               ld->ld_errno = LDAP_DECODING_ERROR;
-               ber_free( ber, 0 );
-               return ld->ld_errno;
-       }
-
-       resoid = NULL;
-       resdata = NULL;
-
-       tag = ber_peek_tag( ber, &len );
-
-       if( tag == LDAP_TAG_EXOP_RES_OID ) {
-               /* we have a resoid */
-               if( ber_scanf( ber, "a", &resoid ) == LBER_ERROR ) {
-                       ld->ld_errno = LDAP_DECODING_ERROR;
-                       ber_free( ber, 0 );
-                       return ld->ld_errno;
-               }
-
-               tag = ber_peek_tag( ber, &len );
-       }
-
-       if( tag == LDAP_TAG_EXOP_RES_VALUE ) {
-               /* we have a resdata */
-               if( ber_scanf( ber, "O", &resdata ) == LBER_ERROR ) {
-                       ld->ld_errno = LDAP_DECODING_ERROR;
-                       ber_free( ber, 0 );
-                       if( resoid != NULL ) LDAP_FREE( resoid );
-                       return ld->ld_errno;
-               }
-       }
-
-       ber_free( ber, 0 );
-
-       if( retoidp != NULL ) {
-               *retoidp = resoid;
-       } else {
-               LDAP_FREE( resoid );
-       }
-
-       if( retdatap != NULL ) {
-               *retdatap = resdata;
-       } else {
-               ber_bvfree( resdata );
-       }
-
-       ld->ld_errno = errcode;
-
-       if( freeit ) {
-               ldap_msgfree( res );
-       }
-
-       return LDAP_SUCCESS;
-}
-#endif