/* $OpenLDAP$ */
-/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* Portions Copyright (C) The Internet Society (1997).
+ * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
*/
/*
{
BerElement *ber;
int rc;
+ ber_int_t id;
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, ENTRY, "ldap_extended_operation\n", 0,0,0 );
return( ld->ld_errno );
}
+ LDAP_NEXT_MSGID( ld, id );
if ( reqdata != NULL ) {
rc = ber_printf( ber, "{it{tstON}", /* '}' */
- ++ld->ld_msgid, LDAP_REQ_EXTENDED,
+ id, LDAP_REQ_EXTENDED,
LDAP_TAG_EXOP_REQ_OID, reqoid,
LDAP_TAG_EXOP_REQ_VALUE, reqdata );
} else {
rc = ber_printf( ber, "{it{tsN}", /* '}' */
- ++ld->ld_msgid, LDAP_REQ_EXTENDED,
+ id, LDAP_REQ_EXTENDED,
LDAP_TAG_EXOP_REQ_OID, reqoid );
}
}
/* send the message */
- *msgidp = ldap_send_initial_request( ld, LDAP_REQ_EXTENDED, NULL, ber );
+ *msgidp = ldap_send_initial_request( ld, LDAP_REQ_EXTENDED, NULL, ber, id );
return( *msgidp < 0 ? ld->ld_errno : LDAP_SUCCESS );
}
/* Parse an extended partial */
int
-ldap_parse_extended_partial (
+ldap_parse_intermediate (
LDAP *ld,
LDAPMessage *res,
char **retoidp,
assert( res != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_extended_partial\n", 0,0,0 );
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_intermediate\n", 0,0,0 );
#else
- Debug( LDAP_DEBUG_TRACE, "ldap_parse_extended_partial\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE, "ldap_parse_intermediate\n", 0, 0, 0 );
#endif
if( ld->ld_version < LDAP_VERSION3 ) {
return ld->ld_errno;
}
- if( res->lm_msgtype != LDAP_RES_EXTENDED_PARTIAL ) {
+ if( res->lm_msgtype != LDAP_RES_INTERMEDIATE ) {
ld->ld_errno = LDAP_PARAM_ERROR;
return ld->ld_errno;
}
goto free_and_return;
}
- rc = ldap_int_get_controls( ber, serverctrls );
+ rc = ldap_pvt_get_controls( ber, serverctrls );
free_and_return:
ber_free( ber, 0 );
return LDAP_SUCCESS;
}
+