Skip to content
Snippets Groups Projects
Commit 4f58efc4 authored by Jong Hyuk Choi's avatar Jong Hyuk Choi
Browse files

- change in message to modlist conversion

parent 074f54f3
No related branches found
No related tags found
No related merge requests found
......@@ -476,6 +476,10 @@ ber_flatten2 LDAP_P((
struct berval *bv,
int alloc ));
LBER_F( int )
ber_remaining LDAP_P((
BerElement *ber ));
/*
* LBER ber accessor functions
*/
......
......@@ -717,3 +717,9 @@ ber_rewind ( BerElement * ber )
ber->ber_end = ber->ber_ptr;
ber->ber_ptr = ber->ber_buf;
}
int
ber_remaining( BerElement * ber )
{
return ber_pvt_ber_remaining( ber );
}
......@@ -500,7 +500,7 @@ do_syncrepl(
entry_free( entry );
for ( ml = modlist; ml != NULL; ml = mlnext ) {
mlnext = ml->sml_next;
free( ml );
ber_memfree( ml );
}
break;
......@@ -699,6 +699,8 @@ syncrepl_message_to_entry(
LDAPControl** rctrls = NULL;
BerElement* ctrl_ber;
ber_tag_t tag;
*modlist = NULL;
if ( ldap_msgtype( msg ) != LDAP_RES_SEARCH_ENTRY ) {
......@@ -732,10 +734,10 @@ syncrepl_message_to_entry(
e->e_attrs = NULL;
for ( rc = ldap_get_attribute_ber( ld, msg, ber, &tmp.sml_type, &tmp.sml_bvalues);
rc == LDAP_SUCCESS;
rc = ldap_get_attribute_ber( ld, msg, ber, &tmp.sml_type, &tmp.sml_bvalues))
{
while ( ber_remaining( ber ) ) {
tag = ber_scanf( ber, "{mW}", &tmp.sml_type, &tmp.sml_values );
if ( tag == LBER_ERROR ) break;
if ( tmp.sml_type.bv_val == NULL ) break;
mod = (Modifications *) ch_malloc( sizeof( Modifications ));
......@@ -862,7 +864,7 @@ done:
return e;
}
int
int
syncuuid_cmp( const void* v_uuid1, const void* v_uuid2 )
{
const struct berval *uuid1 = v_uuid1;
......
......@@ -39,6 +39,9 @@ if test $WAIT != 0 ; then
read foo
fi
echo "Waiting 5 seconds to wait for master to start..."
sleep 5
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
. $CONFFILTER $BACKEND $MONITORDB < $SRSLAVECONF > $REPLCONF
$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment