svn commit: samba r18493 - in branches/SAMBA_4_0/source/lib/replace: .

tridge at samba.org tridge at samba.org
Thu Sep 14 02:37:00 GMT 2006


Author: tridge
Date: 2006-09-14 02:37:00 +0000 (Thu, 14 Sep 2006)
New Revision: 18493

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18493

Log:

another "blind coding" attempt at a getdirentries() based readdir()
replacement

Modified:
   branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c	2006-09-14 02:25:57 UTC (rev 18492)
+++ branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c	2006-09-14 02:37:00 UTC (rev 18493)
@@ -91,7 +91,9 @@
 	struct dirent *de;
 
 	if (d->ofs >= d->nbytes) {
-		d->nbytes = getdirentries(d->fd, d->buf, DIR_BUF_SIZE, &d->seekpos);
+		long pos;
+		d->nbytes = getdirentries(d->fd, d->buf, DIR_BUF_SIZE, &pos);
+		d->seekpos = pos;
 		d->ofs = 0;
 	}
 	if (d->ofs >= d->nbytes) {
@@ -121,8 +123,9 @@
 void seekdir(DIR *dir, long ofs)
 {
 	struct dir_buf *d = (struct dir_buf *)dir;
+	long pos;
 	d->seekpos = lseek(d->fd, ofs & ~(DIR_BUF_SIZE-1), SEEK_SET);
-	d->nbytes = getdirentries(d->fd, d->buf, DIR_BUF_SIZE, &d->seekpos);
+	d->nbytes = getdirentries(d->fd, d->buf, DIR_BUF_SIZE, &pos);
 	d->ofs = 0;
 	while (d->ofs < (ofs & (DIR_BUF_SIZE-1))) {
 		if (readdir(dir) == NULL) break;



More information about the samba-cvs mailing list