const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
size_t cnt = 0;
- DIR *dirp = NULL;
const char *dname = NULL;
char *talloced = NULL;
const char *connect_path = lp_path(frame, lp_sub, snum);
connection_struct *conn = NULL;
struct referral *ref = NULL;
struct smb_filename *smb_fname = NULL;
+ struct smb_Dir *dir_hnd = NULL;
+ long offset = 0;
NTSTATUS status;
if (jn_remain == 0) {
}
/* Now enumerate all dfs links */
- dirp = SMB_VFS_OPENDIR(conn, smb_fname, NULL, 0);
- if(!dirp) {
+ dir_hnd = OpenDir(frame, conn, smb_fname, NULL, 0);
+ if (dir_hnd == NULL) {
goto out;
}
- while ((dname = vfs_readdirname(conn, dirp, NULL, &talloced))
- != NULL) {
+ while ((dname = ReadDirName(dir_hnd, &offset, NULL, &talloced))
+ != NULL)
+ {
struct smb_filename *smb_dname = NULL;
if (cnt >= jn_remain) {
}
out:
-
- if (dirp) {
- SMB_VFS_CLOSEDIR(conn,dirp);
- }
-
TALLOC_FREE(frame);
return cnt;
}