- if (len + 1 + tmp->sml_type.bv_len > sizeof(abuf)) {
- Statslog( LDAP_DEBUG_STATS, "%s MOD attr=%s\n",
- op->o_log_prefix, abuf, 0, 0, 0 );
-
- len = 0;
- ptr = abuf;
-
- if( 1 + tmp->sml_type.bv_len > sizeof(abuf)) {
- Statslog( LDAP_DEBUG_STATS, "%s MOD attr=%s\n",
- op->o_log_prefix, tmp->sml_type.bv_val, 0, 0, 0 );
- continue;
- }
- }
- if (len) {
- *ptr++ = ' ';
- len++;
+ alen = tmp->sml_type.bv_len;
+ if ( alen >= 256 )
+ alen = 255;
+ if (len + 1 + alen >= LOGBUFSIZ ) {
+ if ( ldap_debug & LDAP_DEBUG_STATS )
+ lutil_debug( ldap_debug, LDAP_DEBUG_STATS, "%s", op->o_log_prefix );
+ if ( ldap_syslog & LDAP_DEBUG_STATS )
+ sendlog( op->o_logbuf, ptr - op->o_logbuf );
+ ptr = lutil_strcopy( op->o_logptr, " MOD attr=" );
+ len = ptr - op->o_logbuf;