From: Ralph Boehme Date: Fri, 24 May 2019 17:08:10 +0000 (+0200) Subject: s3: lib: Rename all uses of file_pload_XXX -> file_ploadv_XXX. X-Git-Tag: ldb-2.0.5~624 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbfa3cd186428c02589aa9093e868554b4c695d5;p=thirdparty%2Fsamba.git s3: lib: Rename all uses of file_pload_XXX -> file_ploadv_XXX. Keep naming consistent across all usage. 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 770609d0b11..1c468ea5501 100644 --- a/source3/lib/util_file.c +++ b/source3/lib/util_file.c @@ -26,24 +26,24 @@ #include "lib/async_req/async_sock.h" #include "lib/util/tevent_unix.h" -struct file_pload_state { +struct file_ploadv_state { struct tevent_context *ev; size_t maxsize; int fd; uint8_t *buf; }; -static int file_pload_state_destructor(struct file_pload_state *s); -static void file_pload_readable(struct tevent_req *subreq); +static int file_ploadv_state_destructor(struct file_ploadv_state *s); +static void file_ploadv_readable(struct tevent_req *subreq); struct tevent_req *file_ploadv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, char * const argl[], size_t maxsize) { struct tevent_req *req = NULL, *subreq = NULL; - struct file_pload_state *state = NULL; + struct file_ploadv_state *state = NULL; - req = tevent_req_create(mem_ctx, &state, struct file_pload_state); + req = tevent_req_create(mem_ctx, &state, struct file_ploadv_state); if (req == NULL) { return NULL; } @@ -55,17 +55,17 @@ struct tevent_req *file_ploadv_send(TALLOC_CTX *mem_ctx, tevent_req_error(req, errno); return tevent_req_post(req, ev); } - talloc_set_destructor(state, file_pload_state_destructor); + talloc_set_destructor(state, file_ploadv_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); + tevent_req_set_callback(subreq, file_ploadv_readable, req); return req; } -static int file_pload_state_destructor(struct file_pload_state *s) +static int file_ploadv_state_destructor(struct file_ploadv_state *s) { if (s->fd != -1) { sys_pclose(s->fd); @@ -74,12 +74,12 @@ static int file_pload_state_destructor(struct file_pload_state *s) return 0; } -static void file_pload_readable(struct tevent_req *subreq) +static void file_ploadv_readable(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data( subreq, struct tevent_req); - struct file_pload_state *state = tevent_req_data( - req, struct file_pload_state); + struct file_ploadv_state *state = tevent_req_data( + req, struct file_ploadv_state); uint8_t buf[1024]; uint8_t *tmp; ssize_t nread; @@ -131,14 +131,14 @@ static void file_pload_readable(struct tevent_req *subreq) if (tevent_req_nomem(subreq, req)) { return; } - tevent_req_set_callback(subreq, file_pload_readable, req); + tevent_req_set_callback(subreq, file_ploadv_readable, req); } -int file_pload_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, +int file_ploadv_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, uint8_t **buf) { - struct file_pload_state *state = tevent_req_data( - req, struct file_pload_state); + struct file_ploadv_state *state = tevent_req_data( + req, struct file_ploadv_state); int err; if (tevent_req_is_unix_error(req, &err)) { diff --git a/source3/lib/util_file.h b/source3/lib/util_file.h index 97fcf89996d..1aef5a22b44 100644 --- a/source3/lib/util_file.h +++ b/source3/lib/util_file.h @@ -26,7 +26,7 @@ struct tevent_req *file_ploadv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, char * const argl[], size_t maxsize); -int file_pload_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, +int file_ploadv_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, uint8_t **buf); char **file_lines_ploadv(TALLOC_CTX *mem_ctx, char * const argl[], diff --git a/source3/winbindd/idmap_script.c b/source3/winbindd/idmap_script.c index aa3a2e00396..7ad6b806fb8 100644 --- a/source3/winbindd/idmap_script.c +++ b/source3/winbindd/idmap_script.c @@ -142,7 +142,7 @@ static void idmap_script_xid2sid_done(struct tevent_req *subreq) req, struct idmap_script_xid2sid_state); int ret; - ret = file_pload_recv(subreq, state, &state->out); + ret = file_ploadv_recv(subreq, state, &state->out); TALLOC_FREE(subreq); if (tevent_req_error(req, ret)) { return; @@ -398,7 +398,7 @@ static void idmap_script_sid2xid_done(struct tevent_req *subreq) req, struct idmap_script_sid2xid_state); int ret; - ret = file_pload_recv(subreq, state, &state->out); + ret = file_ploadv_recv(subreq, state, &state->out); TALLOC_FREE(subreq); if (tevent_req_error(req, ret)) { return;