FILE *f;
Attribute *a;
Modifications *m;
- struct berval *b, *who = NULL;
+ struct berval *b, *who = NULL, peername;
char *what, *whatm, *suffix;
time_t stamp;
int i;
if ( !who )
who = &op->o_dn;
+ peername = op->o_conn->c_peer_name;
ldap_pvt_thread_mutex_lock(&ad->ad_mutex);
if((f = fopen(ad->ad_logfile, "a")) == NULL) {
ldap_pvt_thread_mutex_unlock(&ad->ad_mutex);
}
stamp = slap_get_time();
- fprintf(f, "# %s %ld %s%s%s\n",
- what, (long)stamp, suffix, who ? " " : "", who ? who->bv_val : "");
+ fprintf(f, "# %s %ld %s%s%s %s conn=%ld\n",
+ what, (long)stamp, suffix, who ? " " : "", who ? who->bv_val : "",
+ peername.bv_val ? peername.bv_val: "", op->o_conn->c_connid);
if ( !BER_BVISEMPTY( &op->o_conn->c_dn ) &&
(!who || !dn_match( who, &op->o_conn->c_dn )))