mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
Add response message for overlays
This commit is contained in:
parent
9f125dbc27
commit
d678a83720
1 changed files with 22 additions and 1 deletions
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
static ConfigDriver bs_cf_gen;
|
||||
static int sock_over_setup();
|
||||
static slap_response sock_over_response;
|
||||
|
||||
enum {
|
||||
BS_EXT = 1
|
||||
|
|
@ -185,11 +186,31 @@ static int sock_over_op(
|
|||
}
|
||||
|
||||
static int
|
||||
sock_over_response( Operatiion *op, SlapReply *rs )
|
||||
sock_over_response( Operation *op, SlapReply *rs )
|
||||
{
|
||||
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
|
||||
struct sockinfo *si = (struct sockinfo *)on->on_bi.bi_private;
|
||||
FILE *fp;
|
||||
|
||||
if ( rs->sr_type != REP_RESULT )
|
||||
return SLAP_CB_CONTINUE;
|
||||
|
||||
if (( fp = opensock( si->si_sockpath )) == NULL )
|
||||
return SLAP_CB_CONTINUE;
|
||||
|
||||
/* write out the result */
|
||||
fprintf( fp, "RESULT\n" );
|
||||
fprintf( fp, "msgid: %ld\n", (long) op->o_msgid );
|
||||
sock_print_conn( fp, op->o_conn, si );
|
||||
fprintf( fp, "code: %d\n", rs->sr_err );
|
||||
if ( rs->sr_matched )
|
||||
fprintf( fp, "matched: %s\n", rs->sr_matched );
|
||||
if (rs->sr_text )
|
||||
fprintf( fp, "info: %s\n", rs->sr_text );
|
||||
fprintf( fp, "\n" );
|
||||
fclose( fp );
|
||||
|
||||
return SLAP_CB_CONTINUE;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue