Skip to content
Snippets Groups Projects
Commit 5b3ce2a1 authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

Add response message for overlays

parent 9c6a5df8
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment