]> arthur.barton.de Git - netatalk.git/commitdiff
1. When in debug mode, print out the AFP function call names as well as their
authorjmarcus <jmarcus>
Sat, 16 Mar 2002 20:38:09 +0000 (20:38 +0000)
committerjmarcus <jmarcus>
Sat, 16 Mar 2002 20:38:09 +0000 (20:38 +0000)
   numeric ids.
2. Don't advertise server sided notifications if AFP version < 2.1.

Submitted by: didier <dgautheron@magic.fr>

etc/afpd/Makefile.am
etc/afpd/afp_asp.c
etc/afpd/afp_dsi.c
etc/afpd/globals.h
etc/afpd/volume.c

index 9644ff24b4af72f6bf8839466a87c5f194dfd19f..1f13c62d493f62aea7b4fcc03fc32c82f02adbc7 100644 (file)
@@ -12,7 +12,8 @@ bin_PROGRAMS = test_parse_mtab
 afpd_SOURCES = unix.c ofork.c main.c switch.c auth.c volume.c directory.c \
         file.c enumerate.c desktop.c filedir.c fork.c appl.c gettok.c \
         status.c afp_options.c afp_asp.c afp_dsi.c messages.c afp_config.c \
-        nfsquota.c codepage.c quota.c uam.c afs.c uid.c parse_mtab.c
+        nfsquota.c codepage.c quota.c uam.c afs.c uid.c parse_mtab.c \
+        afp_util.c
 
 test_parse_mtab_SOURCES = test_parse_mtab.c parse_mtab.c
 test_parse_mtab_LDADD = $(top_builddir)/libatalk/libatalk.la
index 766a7c74da9077b8466ead8a267a1c64f5c80bca..a5fd741e435d6843cd9570e87d0331b77bd800b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_asp.c,v 1.12 2002-02-28 21:20:39 jmarcus Exp $
+ * $Id: afp_asp.c,v 1.13 2002-03-16 20:38:09 jmarcus Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -181,7 +181,7 @@ void afp_over_asp(AFPObj *obj)
 #endif /* AFS */
             func = (u_char) asp->commands[0];
             if ( obj->options.flags & OPTION_DEBUG ) {
-                printf( "command: %d\n", func );
+                printf("command: %d (%s)\n", func, AfpNum2name(func));
                 bprint( asp->commands, asp->cmdlen );
             }
             if ( afp_switch[ func ] != NULL ) {
index b732e57c2654f26cabd3762d6e8b32af14edd37e..f364989765ce3a57aa2b112877f2be400dd5a72e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.18 2002-01-19 21:29:55 jmarcus Exp $
+ * $Id: afp_dsi.c,v 1.19 2002-03-16 20:38:09 jmarcus Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -227,7 +227,7 @@ void afp_over_dsi(AFPObj *obj)
 
             function = (u_char) dsi->commands[0];
             if (obj->options.flags & OPTION_DEBUG ) {
-                printf("command: %d\n", function);
+                printf("command: %d (%s)\n", function, AfpNum2name(function));
                 bprint((char *) dsi->commands, dsi->cmdlen);
             }
 
index 4793827c12a7e348d232692592ba6ecd469fa29c..3afcff9dc1f38686c4685e1b654120fc20910ded 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: globals.h,v 1.10 2002-03-13 19:28:23 srittau Exp $
+ * $Id: globals.h,v 1.11 2002-03-16 20:38:09 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -89,6 +89,9 @@ extern void readmessage __P((void));
 extern void initline   __P((int, char *));
 extern int  parseline  __P((int, char *));
 
+/* afp_util.c */
+const char *AfpNum2name __P((int ));
+
 #ifndef NO_DDP
 extern void afp_over_asp __P((AFPObj *));
 #endif /* NO_DDP */
index ddfc6186468e860e6f00150e9a9ddaeacf3d962a..46c6b0209b9212a5f462ebe7a3a09e54cbb21505 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.23 2002-03-13 19:29:17 srittau Exp $
+ * $Id: volume.c,v 1.24 2002-03-16 20:38:09 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -1308,7 +1308,7 @@ struct vol        *vol;
     /* a little granularity */
     if (vol->v_time < tv.tv_sec) {
         vol->v_time = tv.tv_sec;
-        if (obj->options.server_notif) {
+        if (afp_version > 21 && obj->options.server_notif) {
             obj->attention(obj->handle, AFPATTN_NOTIFY | AFPATTN_VOLCHANGED);
         }
     }