libsmb: Rename "readlink_state" to "cli_posix_readlink_state"
authorVolker Lendecke <vl@samba.org>
Mon, 25 Mar 2019 11:26:37 +0000 (12:26 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 27 Mar 2019 11:20:23 +0000 (11:20 +0000)
This is more in line with most other users of tevent_req: The state is
called fully after the routines it acts as a state repository for.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/clifile.c

index f2bfdcce23d7c43fd388b31da9913a7a98fb456b..5922557263c1af2df75d5aa77e08e5b54ec3fec2 100644 (file)
@@ -299,7 +299,7 @@ NTSTATUS cli_posix_symlink(struct cli_state *cli,
  Read a POSIX symlink.
 ****************************************************************************/
 
-struct readlink_state {
+struct cli_posix_readlink_state {
        uint8_t *data;
        uint32_t num_data;
 };
@@ -313,10 +313,11 @@ struct tevent_req *cli_posix_readlink_send(TALLOC_CTX *mem_ctx,
                                        size_t len)
 {
        struct tevent_req *req = NULL, *subreq = NULL;
-       struct readlink_state *state = NULL;
+       struct cli_posix_readlink_state *state = NULL;
        uint32_t maxbytelen = (uint32_t)(smbXcli_conn_use_unicode(cli->conn) ? len*3 : len);
 
-       req = tevent_req_create(mem_ctx, &state, struct readlink_state);
+       req = tevent_req_create(
+               mem_ctx, &state, struct cli_posix_readlink_state);
        if (req == NULL) {
                return NULL;
        }
@@ -342,8 +343,8 @@ static void cli_posix_readlink_done(struct tevent_req *subreq)
 {
        struct tevent_req *req = tevent_req_callback_data(
                subreq, struct tevent_req);
-       struct readlink_state *state = tevent_req_data(
-               req, struct readlink_state);
+       struct cli_posix_readlink_state *state = tevent_req_data(
+               req, struct cli_posix_readlink_state);
        NTSTATUS status;
 
        status = cli_qpathinfo_recv(subreq, state, &state->data,
@@ -365,10 +366,11 @@ static void cli_posix_readlink_done(struct tevent_req *subreq)
 NTSTATUS cli_posix_readlink_recv(struct tevent_req *req, struct cli_state *cli,
                                char *retpath, size_t len)
 {
+       struct cli_posix_readlink_state *state = tevent_req_data(
+               req, struct cli_posix_readlink_state);
        NTSTATUS status;
        char *converted = NULL;
        size_t converted_size = 0;
-       struct readlink_state *state = tevent_req_data(req, struct readlink_state);
 
        if (tevent_req_is_nterror(req, &status)) {
                return status;