Remove the static "struct client_connection" mess which is part of
[jra/samba/.git] / source3 / libsmb / clilist.c
index 1431b804b040e0258670f79e24a171b3635bbb08..a84a64794b05e0cb51baaec1ac679974e5c44c01 100644 (file)
@@ -98,7 +98,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
                           between win2000 and win9x for this call
                           (tridge) */
                        ret = clistr_pull_talloc(ctx,
-                                               cli,
+                                               cli->inbuf,
                                                &finfo->name,
                                                p,
                                                len+2,
@@ -127,7 +127,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
                                return pdata_end - base;
                        }
                        ret = clistr_pull_talloc(ctx,
-                                               cli,
+                                               cli->inbuf,
                                                &finfo->name,
                                                p,
                                                len,
@@ -179,7 +179,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
                                /* stupid NT bugs. grr */
                                int flags = 0;
                                if (p[1] == 0 && namelen > 1) flags |= STR_UNICODE;
-                               clistr_pull(cli, finfo->short_name, p,
+                               clistr_pull(cli->inbuf, finfo->short_name, p,
                                            sizeof(finfo->short_name),
                                            slen, flags);
                        }
@@ -188,7 +188,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
                                return pdata_end - base;
                        }
                        ret = clistr_pull_talloc(ctx,
-                                               cli,
+                                               cli->inbuf,
                                                &finfo->name,
                                                p,
                                                namelen,
@@ -244,7 +244,6 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
        unsigned int param_len, data_len;
        uint16 setup;
        char *param;
-       const char *mnt;
        uint32 resume_key = 0;
        TALLOC_CTX *frame = talloc_stackframe();
        DATA_BLOB last_name_raw = data_blob(NULL, 0);
@@ -457,8 +456,6 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
                First = False;
        }
 
-       mnt = cli_cm_get_mntpoint( cli );
-
         /* see if the server disconnected or the connection otherwise failed */
         if (cli_is_error(cli)) {
                 total_received = -1;
@@ -479,7 +476,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
                                        info_level));
                                break;
                        }
-                        fn(mnt,&finfo, Mask, state);
+                        fn(cli->dfs_mountpoint, &finfo, Mask, state);
                 }
         }
 
@@ -514,7 +511,7 @@ static bool interpret_short_filename(TALLOC_CTX *ctx,
        finfo->mtime_ts.tv_nsec = finfo->atime_ts.tv_nsec = 0;
        finfo->size = IVAL(p,26);
        ret = clistr_pull_talloc(ctx,
-                       cli,
+                       cli->inbuf,
                        &finfo->name,
                        p+30,
                        12,