Subject: Patch for Quark et al

From: Joe Clarke <[email-masked]>
Date: Fri, 18 Jan 2002 11:24:07 -0500 (EST)

I committed a patch the other day that Lawrence Farr has been testing for
me that seems to have good results with Quark and Retrospect.  It has not
been back-ported from HEAD yet, but here is the diff to 1.5.0.  Please
test this if you can.  I'm looking for littleendian Linux, Tru64,
littleendian OpenBSD, and littleendian NetBSD, and littleendian Solaris
feedback.  Thanks.

Joe

--- etc/afpd/fork.c.orig	Wed Jan 16 15:20:47 2002
+++ etc/afpd/fork.c	Wed Jan 16 15:21:12 2002
@@ -190,9 +190,9 @@
 
             if (aint == 0) {
 #ifdef AFS
-                aint = st.st_ino;
+                aint = htonl(st.st_ino);
 #else /* AFS */
-                aint = ( st.st_dev << 16 ) | ( st.st_ino & 0x0000ffff );
+                aint = htonl(( st.st_dev << 16 ) | ( st.st_ino & 0x0000ffff ));
 #endif /* AFS */
             }

---

From: Rick Zeman <[email-masked]>
Date: Fri, 25 Jan 2002 23:19:07 -0500

> littleendian OpenBSD, and littleendian NetBSD, and littleendian Solaris

I tried the patch and with my first test (with Word X) and ended up get
"afp_flushfork: of_find: No such file or directory and then afpd would kill
pid of the child process that mounted the volume. :-(

-- 
"So Long, and Thanks For All the Fish."
       --Douglas Adams
          1952-2001

---

From: Joe Clarke <[email-masked]>
Date: 26 Jan 2002 15:16:33 -0500

> pid of the child process that mounted the volume. :-(

Can you also try the attached patch to see if that problem goes away? 
Thanks.

Joe

--- etc/afpd/ofork.c.orig	Sat Jan 26 15:13:54 2002
+++ etc/afpd/ofork.c	Sat Jan 26 15:14:54 2002
@@ -152,11 +152,15 @@
             return NULL;
     }
 
-    for ( refnum = lastrefnum++, i = 0; i < nforks; i++, refnum++ ) {
+	for ( refnum = ++lastrefnum, i = 0; i < nforks; i++, refnum++ ) {
+		/* cf AFP3.0.pdf, File fork page 40 */
+		if (!refnum)
+			refnum++;
         if ( oforks[ refnum % nforks ] == NULL ) {
             break;
         }
     }
+	lastrefnum = refnum;
     if ( i == nforks ) {
         syslog(LOG_ERR, "of_alloc: maximum number of forks exceeded.");
         return( NULL );

---

From: Rick Zeman <[email-masked]>
Date: Sun, 27 Jan 2002 21:55:20 -0500

> Can you also try the attached patch to see if that problem goes away?

Patched a clean tarball and if anything, the problem occurred quicker, just
opening the file gave the first flushfork error and the first save booted me
off.

---

From: Joe Clarke <[email-masked]>
Date: 27 Jan 2002 23:03:44 -0500

> opening the file gave the first flushfork error and the first save booted me

Are you using both patches I sent you, or just the latter?  You should
be using both patches.

Joe

> _______________________________________________
> Netatalk-devel mailing list
> [email-masked]
> https://lists.sourceforge.net/lists/listinfo/netatalk-devel
>