openldap/libraries/libldap/messages.c
Kurt Zeilenga 2c7dae116b More argument handling updates
(don't check what we expect applications to check).
2002-06-06 00:26:50 +00:00

56 lines
861 B
C

/* $OpenLDAP$ */
/*
* Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/*
* messages.c
*/
#include "portable.h"
#include <stdio.h>
#include <ac/stdlib.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "ldap-int.h"
LDAPMessage *
ldap_first_message( LDAP *ld, LDAPMessage *chain )
{
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
assert( chain != NULL );
return chain;
}
LDAPMessage *
ldap_next_message( LDAP *ld, LDAPMessage *msg )
{
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
assert( msg != NULL );
return msg->lm_chain;
}
int
ldap_count_messages( LDAP *ld, LDAPMessage *chain )
{
int i;
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
for ( i = 0; chain != NULL; chain = chain->lm_chain ) {
i++;
}
return( i );
}