+/* messages.c */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-/*
- * messages.c
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2005 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>.
*/
#include "portable.h"
#include <ac/stdlib.h>
-#include <ac/ctype.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
{
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
+ assert( chain != NULL );
- if ( ld == NULL || chain == NULL ) {
- return NULL;
- }
-
return chain;
}
{
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
+ assert( msg != NULL );
- if ( ld == NULL || msg == NULL || msg->lm_chain == NULL ) {
- return NULL;
- }
-
- return( msg->lm_chain );
+ return msg->lm_chain;
}
int
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
- if ( ld == NULL ) {
- return -1;
- }
-
for ( i = 0; chain != NULL; chain = chain->lm_chain ) {
i++;
}
return( i );
}
+
+BerElement*
+ldap_get_message_ber( LDAPMessage *ld )
+{
+ return ld->lm_ber;
+}