]> arthur.barton.de Git - netatalk.git/commitdiff
Merge product-2-2
authorFrank Lahm <franklahm@googlemail.com>
Tue, 15 May 2012 13:41:11 +0000 (15:41 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Tue, 15 May 2012 13:41:11 +0000 (15:41 +0200)
1  2 
NEWS
etc/afpd/afp_avahi.c
etc/afpd/afp_mdns.c
etc/afpd/file.c

diff --cc NEWS
Simple merge
Simple merge
Simple merge
diff --cc etc/afpd/file.c
index 3c3d15e8cddd95e70b840ef420f051864a107bcd,efc002bc0bfd11eb8797e8046b1aa71bda92e240..d9201c056a804366aa5042ac780dd72b025d4518
@@@ -239,20 -264,17 +239,16 @@@ restart
                          vol->v_path);
                      vol->v_cdb = cnid_open(vol->v_path, vol->v_umask, "tdb", flags, NULL, NULL);
                      if (vol->v_cdb) {
-                         /* set ro mode*/
-                         vol->v_flags |= AFPVOL_RO;
- #ifdef SERVERTEXT
-                         /* kill ourself with SIGUSR2 aka msg pending */
-                         setmessage("Something wrong with the volume's CNID DB, using temporary CNID DB instead."
-                                    "Check server messages for details. Switching to read-only mode.");
-                         kill(getpid(), SIGUSR2);
- #endif
-                         goto restart; /* not try again with the temp CNID db */
 -                        vol->v_flags &= ~AFPVOL_CACHE;
+                         if (!(vol->v_flags & AFPVOL_TM)) {
+                             vol->v_flags |= AFPVOL_RO;
+                             setmessage("Something wrong with the volume's CNID DB, using temporary CNID DB instead."
+                                        "Check server messages for details. Switching to read-only mode.");
+                             kill(getpid(), SIGUSR2);
+                         }
+                         goto restart; /* now try again with the temp CNID db */
                      } else {
- #ifdef SERVERTEXT
                          setmessage("Something wrong with the volume's CNID DB, using temporary CNID DB failed too!"
                                     "Check server messages for details, can't recover from this state!");
- #endif
                      }
                  }
                  afp_errno = AFPERR_MISC;