1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00

r6417: Strange old IRIX systems return -1 for telldir() when

end of directory reached. Don't check for that and bail
when reading directory entries as it's a valid value.
Excellent work from Cale Fairchild <cale@brocku.ca>
tracked this down.
Jeremy.
(This used to be commit a60fe9aba1)
This commit is contained in:
Jeremy Allison 2005-04-21 07:57:52 +00:00 committed by Gerald (Jerry) Carter
parent 6b705097d4
commit d0a0930485

View File

@ -1038,11 +1038,7 @@ const char *ReadDirName(struct smb_Dir *dirp, long *poffset)
while ((n = vfs_readdirname(conn, dirp->dir))) {
struct name_cache_entry *e;
dirp->offset = SMB_VFS_TELLDIR(conn, dirp->dir);
if (dirp->offset == -1) {
return NULL;
}
dirp->name_cache_index = (dirp->name_cache_index+1) % NAME_CACHE_SIZE;
e = &dirp->name_cache[dirp->name_cache_index];
SAFE_FREE(e->name);
e->name = SMB_STRDUP(n);