/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2007 The OpenLDAP Foundation.
+ * Copyright 2007-2012 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
}
if ( !ap ) {
- if ( !rs->sr_flags & REP_ENTRY_MODIFIABLE ) {
- rs->sr_entry = entry_dup( rs->sr_entry );
- rs->sr_flags |=
- REP_ENTRY_MODIFIABLE|REP_ENTRY_MUSTBEFREED;
+ if ( rs_entry2modifiable( op,rs, on )) {
a = attr_find( rs->sr_entry->e_attrs,
ad_usnChanged );
}
}
ui = ch_calloc(1, sizeof(usn_info_t));
+ ldap_pvt_thread_mutex_init( &ui->ui_mutex );
on->on_bi.bi_private = ui;
return 0;
}
void *thrctx;
Modifications mod;
- SlapReply rsm = { 0 };
slap_callback cb = {0};
char intbuf[64];
struct berval bv[2];
)
{
slap_overinst *on = (slap_overinst *)be->bd_info;
- ch_free( on->on_bi.bi_private );
+ usn_info_t *ui = on->on_bi.bi_private;
+
+ ldap_pvt_thread_mutex_destroy( &ui->ui_mutex );
+ ch_free( ui );
+ on->on_bi.bi_private = NULL;
return 0;
}