]> arthur.barton.de Git - netatalk.git/commitdiff
Merge from HEAD:
authorjmarcus <jmarcus>
Wed, 23 Jan 2002 18:34:14 +0000 (18:34 +0000)
committerjmarcus <jmarcus>
Wed, 23 Jan 2002 18:34:14 +0000 (18:34 +0000)
fork.c: 1.14, 1.15, 1.17, 1.18 - Send out Fork Num using the correct
byte order

volume.c: 1.19, 1.20 - Change the first DID from 3 to 17 to be more in sync
with AFP spec

afp_dsi.c: 1.17 - Don't reference a freed pointer when logging out

etc/afpd/afp_dsi.c
etc/afpd/fork.c
etc/afpd/volume.c

index bad585f0ab5a24d49c26a92ae0f29d0af5d778b8..d79068d7a7f8870cefa5b7acdce0b72563aca844 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.9.2.3 2002-01-14 02:56:08 srittau Exp $
+ * $Id: afp_dsi.c,v 1.9.2.4 2002-01-23 18:34:14 jmarcus Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -57,12 +57,12 @@ static __inline__ void afp_dsi_close(AFPObj *obj)
     if (obj->logout)
         (*obj->logout)();
 
-    dsi_close(dsi);
-
     /* UAM had syslog control; afpd needs to reassert itself */
     openlog( "afpd", LOG_NDELAY|LOG_PID, LOG_DAEMON);
     syslog(LOG_INFO, "%.2fKB read, %.2fKB written",
            dsi->read_count/1024.0, dsi->write_count/1024.0);
+
+    dsi_close(dsi);
 }
 
 /* a little bit of code duplication. */
index b102487599aef6620b90783756ac5b9f2cc655ae..6ee58225f74c248537ab30959879dc9632e00e66 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: fork.c,v 1.11.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: fork.c,v 1.11.2.2 2002-01-23 18:34:14 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -189,11 +189,16 @@ const u_int16_t     attrbits;
 #endif /* CNID_DB */
 
             if (aint == 0) {
-#ifdef AFS
-                aint = st.st_ino;
-#else /* AFS */
-                aint = ( st.st_dev << 16 ) | ( st.st_ino & 0x0000ffff );
-#endif /* AFS */
+#ifdef USE_LASTDID
+                               aint = htonl(( st.st_dev << 16 ) | ( st.st_ino & 0x0000ffff ));
+#else /* USE_LASTDID */
+                               lstp = lstat(upath, &lst) < 0 ? &st : &lst;
+#ifdef DID_MTAB
+                               aint = htonl( afpd_st_cnid ( lstp ) );
+#else /* DID_MTAB */
+                               aint = htonl(CNID(lstp, 1));
+#endif /* DID_MTAB */
+#endif /* USE_LASTDID */
             }
 
             memcpy(data, &aint, sizeof( aint ));
index bb706d63ec3e33f913a49b82165b23f6bb904bd9..2866a39450f454e947cbad0043b260aee1e91cf1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.14.2.2 2002-01-14 02:50:34 srittau Exp $
+ * $Id: volume.c,v 1.14.2.3 2002-01-23 18:34:14 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -462,7 +462,7 @@ static int creatvol(const char *path, char *name, struct vol_option *options)
     volume->v_qfd = -1;
 #endif /* __svr4__ */
     volume->v_vid = lastvid++;
-    volume->v_lastdid = 3;
+    volume->v_lastdid = 17;
 
     /* handle options */
     if (options) {
@@ -1196,7 +1196,7 @@ int               ibuflen, *rbuflen;
      * the desk-top.  That's because the Mac remembers the DID for the
      * trash (even for volumes in different zones, on different servers).
      * Just so this works better, we prime the DID cache with the trash,
-     * fixing the trash at DID 3.
+     * fixing the trash at DID 17.
      */
     p = Trash;
     cname( volume, volume->v_dir, &p );