static ConfigDriver bs_cf_gen;
static int sock_over_setup();
+static slap_response sock_over_response;
enum {
BS_EXT = 1
}
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