version 1.10, 2011/02/03 19:47:38
|
version 1.11, 2011/02/03 20:24:26
|
Line 1
|
Line 1
|
/* config.c - sock backend configuration file routine */ |
/* config.c - sock backend configuration file routine */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/back-sock/config.c,v 1.9 2011/02/03 19:17:23 hyc Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/back-sock/config.c,v 1.10 2011/02/03 19:47:38 hyc Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 2007-2011 The OpenLDAP Foundation. |
* Copyright 2007-2011 The OpenLDAP Foundation. |
Line 31
|
Line 31
|
|
|
static ConfigDriver bs_cf_gen; |
static ConfigDriver bs_cf_gen; |
static int sock_over_setup(); |
static int sock_over_setup(); |
|
static slap_response sock_over_response; |
|
|
enum { |
enum { |
BS_EXT = 1 |
BS_EXT = 1 |
Line 185 static int sock_over_op(
|
Line 186 static int sock_over_op(
|
} |
} |
|
|
static int |
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; |
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; |
struct sockinfo *si = (struct sockinfo *)on->on_bi.bi_private; |
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 |
static int |