mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
Move read_ldap_done after read_ldap_send
This commit is contained in:
parent
f5321ffea8
commit
8e22e38c9c
@ -486,7 +486,7 @@ CLDAP_OBJ = libads/cldap.o \
|
||||
../lib/util/idtree.o \
|
||||
$(LIBCLI_LDAP_MESSAGE_OBJ) $(LIBCLI_LDAP_NDR_OBJ) $(LIBTSOCKET_OBJ)
|
||||
|
||||
TLDAP_OBJ = lib/tldap.o lib/tldap_util.o
|
||||
TLDAP_OBJ = lib/tldap.o lib/tldap_util.o lib/util_tsock.o
|
||||
|
||||
LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
|
||||
libsmb/clikrb5.o libsmb/clispnego.o ../lib/util/asn1.o \
|
||||
@ -1219,7 +1219,7 @@ NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
|
||||
NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
|
||||
../lib/util/asn1.o libsmb/spnego.o libsmb/clikrb5.o libads/kerberos.o \
|
||||
$(LIBADS_SERVER_OBJ) \
|
||||
$(PASSDB_OBJ) $(GROUPDB_OBJ) \
|
||||
$(PASSDB_OBJ) $(LIBTSOCKET_OBJ) $(GROUPDB_OBJ) \
|
||||
$(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
|
||||
$(LDB_OBJ) $(WBCOMMON_OBJ) \
|
||||
$(LIBNDR_GEN_OBJ0) $(LIBNDR_GEN_OBJ1) @BUILD_INIPARSER@
|
||||
|
@ -229,6 +229,31 @@ struct read_ldap_state {
|
||||
bool done;
|
||||
};
|
||||
|
||||
static ssize_t read_ldap_more(uint8_t *buf, size_t buflen, void *private_data);
|
||||
static void read_ldap_done(struct tevent_req *subreq);
|
||||
|
||||
static struct tevent_req *read_ldap_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct tstream_context *conn)
|
||||
{
|
||||
struct tevent_req *req, *subreq;
|
||||
struct read_ldap_state *state;
|
||||
|
||||
req = tevent_req_create(mem_ctx, &state, struct read_ldap_state);
|
||||
if (req == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
state->done = false;
|
||||
|
||||
subreq = tstream_read_packet_send(state, ev, conn, 2, read_ldap_more,
|
||||
state);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
tevent_req_set_callback(subreq, read_ldap_done, req);
|
||||
return req;
|
||||
}
|
||||
|
||||
static ssize_t read_ldap_more(uint8_t *buf, size_t buflen, void *private_data)
|
||||
{
|
||||
struct read_ldap_state *state = talloc_get_type_abort(
|
||||
@ -275,30 +300,6 @@ static ssize_t read_ldap_more(uint8_t *buf, size_t buflen, void *private_data)
|
||||
return len;
|
||||
}
|
||||
|
||||
static void read_ldap_done(struct tevent_req *subreq);
|
||||
|
||||
static struct tevent_req *read_ldap_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct tstream_context *conn)
|
||||
{
|
||||
struct tevent_req *req, *subreq;
|
||||
struct read_ldap_state *state;
|
||||
|
||||
req = tevent_req_create(mem_ctx, &state, struct read_ldap_state);
|
||||
if (req == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
state->done = false;
|
||||
|
||||
subreq = tstream_read_packet_send(state, ev, conn, 2, read_ldap_more,
|
||||
state);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
tevent_req_set_callback(subreq, read_ldap_done, req);
|
||||
return req;
|
||||
}
|
||||
|
||||
static void read_ldap_done(struct tevent_req *subreq)
|
||||
{
|
||||
struct tevent_req *req = tevent_req_callback_data(
|
||||
|
Loading…
x
Reference in New Issue
Block a user