diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-31 08:30:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:25 -0500 |
commit | 9a70f446fc4abc2bd1278772810c0e8132f4bea4 (patch) | |
tree | b9baaa7b19c88afaa26f0cd0a35201fb5c433a3d /source4/libcli/composite/loadfile.c | |
parent | 58d6c73e946d11574a6220f37887e1cdfe05f525 (diff) | |
download | samba-9a70f446fc4abc2bd1278772810c0e8132f4bea4.tar.gz samba-9a70f446fc4abc2bd1278772810c0e8132f4bea4.tar.bz2 samba-9a70f446fc4abc2bd1278772810c0e8132f4bea4.zip |
r5126: the composite code is no longer client specific or smb specific, so
rename the core structure to composite_context and the wait routine to
composite_wait() (suggestion from metze)
(This used to be commit cf11d05e35179c2c3e51c5ab370cd0a3fb15f24a)
Diffstat (limited to 'source4/libcli/composite/loadfile.c')
-rw-r--r-- | source4/libcli/composite/loadfile.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source4/libcli/composite/loadfile.c b/source4/libcli/composite/loadfile.c index 37f3608a4b..69a8219dba 100644 --- a/source4/libcli/composite/loadfile.c +++ b/source4/libcli/composite/loadfile.c @@ -43,7 +43,7 @@ struct loadfile_state { /* setup for the close */ -static NTSTATUS setup_close(struct smbcli_composite *c, +static NTSTATUS setup_close(struct composite_context *c, struct smbcli_tree *tree, uint16_t fnum) { struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); @@ -72,7 +72,7 @@ static NTSTATUS setup_close(struct smbcli_composite *c, called when the open is done - pull the results and setup for the first readx, or close if the file is zero size */ -static NTSTATUS loadfile_open(struct smbcli_composite *c, +static NTSTATUS loadfile_open(struct composite_context *c, struct smb_composite_loadfile *io) { struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); @@ -126,7 +126,7 @@ static NTSTATUS loadfile_open(struct smbcli_composite *c, called when a read is done - pull the results and setup for the next read, or close if the file is all done */ -static NTSTATUS loadfile_read(struct smbcli_composite *c, +static NTSTATUS loadfile_read(struct composite_context *c, struct smb_composite_loadfile *io) { struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); @@ -160,7 +160,7 @@ static NTSTATUS loadfile_read(struct smbcli_composite *c, /* called when the close is done, check the status and cleanup */ -static NTSTATUS loadfile_close(struct smbcli_composite *c, +static NTSTATUS loadfile_close(struct composite_context *c, struct smb_composite_loadfile *io) { struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); @@ -180,7 +180,7 @@ static NTSTATUS loadfile_close(struct smbcli_composite *c, */ static void loadfile_handler(struct smbcli_request *req) { - struct smbcli_composite *c = req->async.private; + struct composite_context *c = req->async.private; struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); /* when this handler is called, the stage indicates what @@ -213,13 +213,13 @@ static void loadfile_handler(struct smbcli_request *req) composite loadfile call - does an openx followed by a number of readx calls, followed by a close */ -struct smbcli_composite *smb_composite_loadfile_send(struct smbcli_tree *tree, +struct composite_context *smb_composite_loadfile_send(struct smbcli_tree *tree, struct smb_composite_loadfile *io) { - struct smbcli_composite *c; + struct composite_context *c; struct loadfile_state *state; - c = talloc_zero(tree, struct smbcli_composite); + c = talloc_zero(tree, struct composite_context); if (c == NULL) goto failed; state = talloc(c, struct loadfile_state); @@ -264,11 +264,11 @@ failed: /* composite loadfile call - recv side */ -NTSTATUS smb_composite_loadfile_recv(struct smbcli_composite *c, TALLOC_CTX *mem_ctx) +NTSTATUS smb_composite_loadfile_recv(struct composite_context *c, TALLOC_CTX *mem_ctx) { NTSTATUS status; - status = smb_composite_wait(c); + status = composite_wait(c); if (NT_STATUS_IS_OK(status)) { struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); @@ -287,7 +287,7 @@ NTSTATUS smb_composite_loadfile(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, struct smb_composite_loadfile *io) { - struct smbcli_composite *c = smb_composite_loadfile_send(tree, io); + struct composite_context *c = smb_composite_loadfile_send(tree, io); return smb_composite_loadfile_recv(c, mem_ctx); } |