From: Jeremy Allison Date: Sat, 18 May 2019 18:32:05 +0000 (-0700) Subject: s3: lib: Remove file_pload_send(). X-Git-Tag: ldb-2.0.5~625 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5c363d65d771c792523f2f3e526c90514212fc2;p=thirdparty%2Fsamba.git s3: lib: Remove file_pload_send(). No longer used. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13964 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/lib/util_file.c b/source3/lib/util_file.c index 6ee2d58b532..770609d0b11 100644 --- a/source3/lib/util_file.c +++ b/source3/lib/util_file.c @@ -36,35 +36,6 @@ struct file_pload_state { static int file_pload_state_destructor(struct file_pload_state *s); static void file_pload_readable(struct tevent_req *subreq); -struct tevent_req *file_pload_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - const char *syscmd, size_t maxsize) -{ - struct tevent_req *req, *subreq; - struct file_pload_state *state; - - req = tevent_req_create(mem_ctx, &state, struct file_pload_state); - if (req == NULL) { - return NULL; - } - state->ev = ev; - state->maxsize = maxsize; - - state->fd = sys_popen(syscmd); - if (state->fd == -1) { - tevent_req_error(req, errno); - return tevent_req_post(req, ev); - } - talloc_set_destructor(state, file_pload_state_destructor); - - subreq = wait_for_read_send(state, state->ev, state->fd, false); - if (tevent_req_nomem(subreq, req)) { - return tevent_req_post(req, ev); - } - tevent_req_set_callback(subreq, file_pload_readable, req); - return req; -} - struct tevent_req *file_ploadv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, char * const argl[], size_t maxsize) diff --git a/source3/lib/util_file.h b/source3/lib/util_file.h index fe2782fd349..97fcf89996d 100644 --- a/source3/lib/util_file.h +++ b/source3/lib/util_file.h @@ -23,9 +23,6 @@ #include "replace.h" #include -struct tevent_req *file_pload_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - const char *syscmd, size_t maxsize); struct tevent_req *file_ploadv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, char * const argl[], size_t maxsize);