Commit ce5224f6 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

op -> slap_op, conn -> slap_conn change

parent fdbe416d
......@@ -20,11 +20,13 @@ struct shellinfo {
};
struct backend;
struct conn;
struct op;
struct slap_conn;
struct slap_op;
extern int forkandexec LDAP_P((char **args, FILE **rfp, FILE **wfp));
extern void print_suffixes LDAP_P((FILE *fp, struct backend *be));
extern int read_and_send_results LDAP_P((struct backend *be, struct conn *conn, struct op *op, FILE *fp, char **attrs, int attrsonly));
extern int read_and_send_results LDAP_P((struct backend *be,
struct slap_conn *conn, struct slap_op *op,
FILE *fp, char **attrs, int attrsonly));
LDAP_END_DECL
......
......@@ -89,7 +89,7 @@ connection_operation( void *arg_v )
pthread_mutex_lock( &arg->co_conn->c_opsmutex );
arg->co_conn->c_opscompleted++;
op_delete( &arg->co_conn->c_ops, arg->co_op );
slap_op_delete( &arg->co_conn->c_ops, arg->co_op );
pthread_mutex_unlock( &arg->co_conn->c_opsmutex );
free( (char *) arg );
......@@ -190,7 +190,7 @@ connection_activity(
pthread_mutex_unlock( &conn->c_dnmutex );
pthread_mutex_lock( &conn->c_opsmutex );
arg->co_op = op_add( &conn->c_ops, ber, msgid, tag, tmpdn,
arg->co_op = slap_op_add( &conn->c_ops, ber, msgid, tag, tmpdn,
conn->c_opsinitiated, conn->c_connid );
pthread_mutex_unlock( &conn->c_opsmutex );
......
......@@ -11,7 +11,7 @@
void
op_free( Operation *op )
slap_op_free( Operation *op )
{
if ( op->o_ber != NULL )
ber_free( op->o_ber, 1 );
......@@ -23,7 +23,7 @@ op_free( Operation *op )
}
Operation *
op_add(
slap_op_add(
Operation **olist,
BerElement *ber,
unsigned long msgid,
......@@ -57,7 +57,7 @@ op_add(
}
void
op_delete( Operation **olist, Operation *op )
slap_op_delete( Operation **olist, Operation *op )
{
Operation **tmp;
......@@ -71,5 +71,5 @@ op_delete( Operation **olist, Operation *op )
}
*tmp = (*tmp)->o_next;
op_free( op );
slap_op_free( op );
}
......@@ -150,10 +150,11 @@ void monitor_info LDAP_P(( Connection *conn, Operation *op ));
* operation.c
*/
void op_free LDAP_P(( Operation *op ));
Operation * op_add LDAP_P(( Operation **olist, BerElement *ber, unsigned long msgid,
void slap_op_free LDAP_P(( Operation *op ));
Operation * slap_op_add LDAP_P(( Operation **olist,
BerElement *ber, unsigned long msgid,
unsigned long tag, char *dn, int id, int connid ));
void op_delete LDAP_P(( Operation **olist, Operation *op ));
void slap_op_delete LDAP_P(( Operation **olist, Operation *op ));
/*
* phonetic.c
......@@ -322,3 +323,4 @@ extern void shell_back_init LDAP_P((Backend *be));
#endif
#endif /* _proto_slap */
......@@ -37,8 +37,8 @@
LDAP_BEGIN_DECL
struct op;
struct conn;
struct slap_op;
struct slap_conn;
/*
* represents an attribute value assertion (i.e., attr=value)
......@@ -213,17 +213,36 @@ struct backend {
void *be_private; /* anything the backend needs */
/* backend routines */
int (*be_bind) LDAP_P((Backend *be, struct conn *c, struct op *o, char *dn, int method, struct berval *cred ));
void (*be_unbind) LDAP_P((Backend *be, struct conn *c, struct op *o ));
int (*be_search) LDAP_P((Backend *be, struct conn *c, struct op *o, char *base, int scope, int deref, int slimit, int tlimit, Filter *f, char *filterstr, char **attrs, int attrsonly));
int (*be_compare)LDAP_P((Backend *be, struct conn *c, struct op *o, char *dn, Ava *ava));
int (*be_modify) LDAP_P((Backend *be, struct conn *c, struct op *o, char *dn, LDAPMod *m));
int (*be_modrdn) LDAP_P((Backend *be, struct conn *c, struct op *o, char *dn, char *newrdn, int deleteoldrdn ));
int (*be_add) LDAP_P((Backend *be, struct conn *c, struct op *o, Entry *e));
int (*be_delete) LDAP_P((Backend *be, struct conn *c, struct op *o, char *dn));
int (*be_bind) LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o,
char *dn, int method, struct berval *cred ));
void (*be_unbind) LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o ));
int (*be_search) LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o,
char *base, int scope, int deref, int slimit, int tlimit,
Filter *f, char *filterstr, char **attrs, int attrsonly));
int (*be_compare)LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o,
char *dn, Ava *ava));
int (*be_modify) LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o,
char *dn, LDAPMod *m));
int (*be_modrdn) LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o,
char *dn, char *newrdn, int deleteoldrdn ));
int (*be_add) LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o,
Entry *e));
int (*be_delete) LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o,
char *dn));
/* Bug: be_abandon in unused! */
void (*be_abandon)LDAP_P((Backend *be, struct conn *c, struct op *o, int msgid));
void (*be_config) LDAP_P((Backend *be, char *fname, int lineno, int argc, char **argv ));
void (*be_abandon)LDAP_P((Backend *be,
struct slap_conn *c, struct slap_op *o,
int msgid));
void (*be_config) LDAP_P((Backend *be,
char *fname, int lineno, int argc, char **argv ));
void (*be_init) LDAP_P((Backend *be));
void (*be_close) LDAP_P((Backend *be));
......@@ -238,7 +257,7 @@ struct backend {
* represents an operation pending from an ldap client
*/
typedef struct op {
typedef struct slap_op {
BerElement *o_ber; /* ber of the request */
long o_msgid; /* msgid of the request */
unsigned long o_tag; /* tag of the request */
......@@ -256,7 +275,7 @@ typedef struct op {
struct sockaddr o_clientaddr; /* client address if via CLDAP */
char o_searchbase; /* search base if via CLDAP */
#endif
struct op *o_next; /* next operation pending */
struct slap_op *o_next; /* next operation pending */
pthread_t o_tid; /* thread handling this op */
int o_abandon; /* signals op has been abandoned */
pthread_mutex_t o_abandonmutex; /* signals op has been abandoned */
......@@ -268,7 +287,7 @@ typedef struct op {
* represents a connection from an ldap client
*/
typedef struct conn {
typedef struct slap_conn {
Sockbuf c_sb; /* ber connection stuff */
char *c_dn; /* current DN bound to this conn */
pthread_mutex_t c_dnmutex; /* mutex for c_dn field */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment