summaryrefslogtreecommitdiff
path: root/source3/libsmb/clireadwrite.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-18 17:27:41 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-18 17:27:41 +0100
commit6ffe233f9442792a0e8e52167a01b76eabd83be9 (patch)
tree37a461845d9395c2290bbde73c3c7f95a7d3a37f /source3/libsmb/clireadwrite.c
parentbfbb0fb17f4eedb8f22d0694c5d4a3b82dfe189b (diff)
parent0dbd3968626445b4dcb00307e45206b37dd0e8ad (diff)
downloadsamba-6ffe233f9442792a0e8e52167a01b76eabd83be9.tar.gz
samba-6ffe233f9442792a0e8e52167a01b76eabd83be9.tar.bz2
samba-6ffe233f9442792a0e8e52167a01b76eabd83be9.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/libsmb/clireadwrite.c')
-rw-r--r--source3/libsmb/clireadwrite.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 1d5582e61d..1ba93d827d 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -278,15 +278,10 @@ struct async_req *cli_pull_send(TALLOC_CTX *mem_ctx,
struct cli_pull_state *state;
int i;
- result = async_req_new(mem_ctx);
- if (result == NULL) {
- goto failed;
- }
- state = talloc(result, struct cli_pull_state);
- if (state == NULL) {
- goto failed;
+ if (!async_req_setup(mem_ctx, &result, &state,
+ struct cli_pull_state)) {
+ return NULL;
}
- result->private_data = state;
result->print = cli_pull_print;
state->req = result;
@@ -843,16 +838,10 @@ static struct async_req *cli_writeall_send(TALLOC_CTX *mem_ctx,
struct async_req *subreq;
struct cli_writeall_state *state;
- result = async_req_new(mem_ctx);
- if (result == NULL) {
- goto fail;
- }
- state = talloc(result, struct cli_writeall_state);
- if (state == NULL) {
- goto fail;
+ if (!async_req_setup(mem_ctx, &result, &state,
+ struct cli_writeall_state)) {
+ return NULL;
}
- result->private_data = state;
-
state->ev = ev;
state->cli = cli;
state->fnum = fnum;
@@ -969,15 +958,10 @@ struct async_req *cli_push_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
struct cli_push_state *state;
int i;
- result = async_req_new(mem_ctx);
- if (result == NULL) {
- goto failed;
- }
- state = talloc(result, struct cli_push_state);
- if (state == NULL) {
- goto failed;
+ if (!async_req_setup(mem_ctx, &result, &state,
+ struct cli_push_state)) {
+ return NULL;
}
- result->private_data = state;
state->req = result;
state->cli = cli;