1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

Rename the async version of get_complete_pdu to get_complete_frag

This commit is contained in:
Volker Lendecke 2009-01-17 12:50:02 +01:00
parent 5e6f3eaae9
commit 761d164420

View File

@ -371,24 +371,24 @@ static NTSTATUS parse_rpc_header(struct rpc_pipe_client *cli,
from the wire. from the wire.
****************************************************************************/ ****************************************************************************/
struct get_complete_pdu_state { struct get_complete_frag_state {
struct event_context *ev; struct event_context *ev;
struct rpc_pipe_client *cli; struct rpc_pipe_client *cli;
struct rpc_hdr_info *prhdr; struct rpc_hdr_info *prhdr;
prs_struct *pdu; prs_struct *pdu;
}; };
static void get_complete_pdu_got_header(struct async_req *subreq); static void get_complete_frag_got_header(struct async_req *subreq);
static void get_complete_pdu_got_rest(struct async_req *subreq); static void get_complete_frag_got_rest(struct async_req *subreq);
static struct async_req *get_complete_pdu_send(TALLOC_CTX *mem_ctx, static struct async_req *get_complete_frag_send(TALLOC_CTX *mem_ctx,
struct event_context *ev, struct event_context *ev,
struct rpc_pipe_client *cli, struct rpc_pipe_client *cli,
struct rpc_hdr_info *prhdr, struct rpc_hdr_info *prhdr,
prs_struct *pdu) prs_struct *pdu)
{ {
struct async_req *result, *subreq; struct async_req *result, *subreq;
struct get_complete_pdu_state *state; struct get_complete_frag_state *state;
uint32_t pdu_len; uint32_t pdu_len;
NTSTATUS status; NTSTATUS status;
@ -396,7 +396,7 @@ static struct async_req *get_complete_pdu_send(TALLOC_CTX *mem_ctx,
if (result == NULL) { if (result == NULL) {
return NULL; return NULL;
} }
state = talloc(result, struct get_complete_pdu_state); state = talloc(result, struct get_complete_frag_state);
if (state == NULL) { if (state == NULL) {
goto fail; goto fail;
} }
@ -420,7 +420,7 @@ static struct async_req *get_complete_pdu_send(TALLOC_CTX *mem_ctx,
status = NT_STATUS_NO_MEMORY; status = NT_STATUS_NO_MEMORY;
goto post_status; goto post_status;
} }
subreq->async.fn = get_complete_pdu_got_header; subreq->async.fn = get_complete_frag_got_header;
subreq->async.priv = result; subreq->async.priv = result;
return result; return result;
} }
@ -445,7 +445,7 @@ static struct async_req *get_complete_pdu_send(TALLOC_CTX *mem_ctx,
status = NT_STATUS_NO_MEMORY; status = NT_STATUS_NO_MEMORY;
goto post_status; goto post_status;
} }
subreq->async.fn = get_complete_pdu_got_rest; subreq->async.fn = get_complete_frag_got_rest;
subreq->async.priv = result; subreq->async.priv = result;
return result; return result;
} }
@ -460,12 +460,12 @@ static struct async_req *get_complete_pdu_send(TALLOC_CTX *mem_ctx,
return NULL; return NULL;
} }
static void get_complete_pdu_got_header(struct async_req *subreq) static void get_complete_frag_got_header(struct async_req *subreq)
{ {
struct async_req *req = talloc_get_type_abort( struct async_req *req = talloc_get_type_abort(
subreq->async.priv, struct async_req); subreq->async.priv, struct async_req);
struct get_complete_pdu_state *state = talloc_get_type_abort( struct get_complete_frag_state *state = talloc_get_type_abort(
req->private_data, struct get_complete_pdu_state); req->private_data, struct get_complete_frag_state);
NTSTATUS status; NTSTATUS status;
status = rpc_read_recv(subreq); status = rpc_read_recv(subreq);
@ -497,11 +497,11 @@ static void get_complete_pdu_got_header(struct async_req *subreq)
if (async_req_nomem(subreq, req)) { if (async_req_nomem(subreq, req)) {
return; return;
} }
subreq->async.fn = get_complete_pdu_got_rest; subreq->async.fn = get_complete_frag_got_rest;
subreq->async.priv = req; subreq->async.priv = req;
} }
static void get_complete_pdu_got_rest(struct async_req *subreq) static void get_complete_frag_got_rest(struct async_req *subreq)
{ {
struct async_req *req = talloc_get_type_abort( struct async_req *req = talloc_get_type_abort(
subreq->async.priv, struct async_req); subreq->async.priv, struct async_req);
@ -516,7 +516,7 @@ static void get_complete_pdu_got_rest(struct async_req *subreq)
async_req_done(req); async_req_done(req);
} }
static NTSTATUS get_complete_pdu_recv(struct async_req *req) static NTSTATUS get_complete_frag_recv(struct async_req *req)
{ {
return async_req_simple_recv(req); return async_req_simple_recv(req);
} }
@ -535,7 +535,7 @@ static NTSTATUS get_complete_pdu(struct rpc_pipe_client *cli,
goto fail; goto fail;
} }
req = get_complete_pdu_send(frame, ev, cli, prhdr, pdu); req = get_complete_frag_send(frame, ev, cli, prhdr, pdu);
if (req == NULL) { if (req == NULL) {
goto fail; goto fail;
} }
@ -544,7 +544,7 @@ static NTSTATUS get_complete_pdu(struct rpc_pipe_client *cli,
event_loop_once(ev); event_loop_once(ev);
} }
status = get_complete_pdu_recv(req); status = get_complete_frag_recv(req);
fail: fail:
TALLOC_FREE(frame); TALLOC_FREE(frame);
return status; return status;