- if ( monitor_cache_add( mi, e ) ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( OPERATION, CRIT,
- "monitor_subsys_sent_init: "
- "unable to add entry 'cn=Entries,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
-#else
- Debug( LDAP_DEBUG_ANY,
- "monitor_subsys_sent_init: "
- "unable to add entry 'cn=Entries,%s'\n%s%s",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
- "", "" );
-#endif
- return( -1 );
- }
-
- e_tmp = e;
-
- /*
- * Referrals
- */
- snprintf( buf, sizeof( buf ),
- "dn: cn=Referrals,%s\n"
- "objectClass: %s\n"
- "structuralObjectClass: %s\n"
- "cn: Referrals\n"
- "creatorsName: %s\n"
- "modifiersName: %s\n"
- "createTimestamp: %s\n"
- "modifyTimestamp: %s\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
- mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
- mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
- mi->mi_creatorsName.bv_val,
- mi->mi_creatorsName.bv_val,
- mi->mi_startTime.bv_val,
- mi->mi_startTime.bv_val );
-
- e = str2entry( buf );
- if ( e == NULL ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( OPERATION, CRIT,
- "monitor_subsys_sent_init: "
- "unable to create entry 'cn=Referrals,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
-#else
- Debug( LDAP_DEBUG_ANY,
- "monitor_subsys_sent_init: "
- "unable to create entry 'cn=Referrals,%s'\n%s%s",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
- "", "" );
-#endif
- return( -1 );
- }
-
- bv.bv_val = "0";
- bv.bv_len = 1;
- attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
-
- mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
- e->e_private = ( void * )mp;
- mp->mp_next = e_tmp;