]> arthur.barton.de Git - netatalk.git/commitdiff
Force LOG message for every AFP call at beginning and end if loglevel>=debug
authorfranklahm <franklahm>
Thu, 16 Apr 2009 06:17:14 +0000 (06:17 +0000)
committerfranklahm <franklahm>
Thu, 16 Apr 2009 06:17:14 +0000 (06:17 +0000)
etc/afpd/afp_dsi.c
etc/afpd/afp_util.c

index 7ccdb10f24740406369e02fcb4c527a3ca441e40..6765e81cc9ef095ef9dc0ec5bf2bdb5824aaabeb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.35 2009-03-20 09:10:25 franklahm Exp $
+ * $Id: afp_dsi.c,v 1.36 2009-04-16 06:17:14 franklahm Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -217,6 +217,7 @@ void afp_over_dsi(AFPObj *obj)
     u_int32_t err, cmd;
     u_int8_t function;
     struct sigaction action;
+    char *afpcmpstr;
 
     obj->exit = afp_dsi_die;
     obj->reply = (int (*)()) dsi_cmdreply;
@@ -364,12 +365,17 @@ void afp_over_dsi(AFPObj *obj)
                 dsi->datalen = DSI_DATASIZ;
                 child.flags |= CHILD_RUNNING;
 
+                afpcmpstr = AfpNum2name(function);
+                LOG(log_debug, logtype_afpd, "=> Start AFP command: %s", afpcmpstr);
+
                 err = (*afp_switch[function])(obj,
                                               dsi->commands, dsi->cmdlen,
                                               dsi->data, &dsi->datalen);
+
+                LOG(log_debug, logtype_afpd, "=> Finished AFP command: %s", afpcmpstr);
 #ifdef FORCE_UIDGID
                /* bring everything back to old euid, egid */
-               if (obj->force_uid)
+                if (obj->force_uid)
                    restore_uidgid ( &obj->uidgid );
 #endif /* FORCE_UIDGID */
                 child.flags &= ~CHILD_RUNNING;
index 2e659cfafc29bc1f30dc4498d82b41dd08c81db3..c37ccfd071ad77edf76540f09c19abc0336634e2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_util.c,v 1.4 2005-04-28 20:49:40 bfernhomberg Exp $
+ * $Id: afp_util.c,v 1.5 2009-04-16 06:17:14 franklahm Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -14,7 +14,6 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef DEBUG1
 #include <atalk/afp.h>
 
 const char *AfpNum2name(int num)
@@ -72,6 +71,7 @@ const char *AfpNum2name(int num)
     case AFP_ADDCMT        : return "AFP_ADDCMT";              /*      56 */
        case AFP_RMVCMT        : return "AFP_RMVCMT";           /*      57 */
        case AFP_GETCMT        : return "AFP_GETCMT";           /*      58 */
+       case AFP_ADDICON       : return "AFP_ADDICON";          /* 192 */
     /* version 3.0 */
     case AFP_BYTELOCK_EXT  : return "AFP_BYTELOCK_EXT";     /*  59 */
     case AFP_READ_EXT      : return "AFP_READ_EXT";         /*  60 */
@@ -84,9 +84,17 @@ const char *AfpNum2name(int num)
     /* version 3.1 */
     case AFP_ENUMERATE_EXT2: return "AFP_ENUMERATE_EXT2";   /*  68 */
     case AFP_ZZZ  : return "AFP_ZZZ";      /* 122 */
-                                                                                                                         
-       case AFP_ADDICON       : return "AFP_ADDICON";          /* 192 */
-       }                                                                                         
+    /* version 3.2 */                                                                                                                    
+    case AFP_GETEXTATTR         : return "AFP_GETEXTATTR";           /* 69 */
+    case AFP_SETEXTATTR         : return "AFP_SETEXTATTR";           /* 70 */
+    case AFP_REMOVEATTR         : return "AFP_REMOVEATTR";           /* 71 */
+    case AFP_LISTEXTATTR        : return "AFP_LISTEXTATTR";          /* 72 */
+    case AFP_GETACL             : return "AFP_GETACL";           /* 73 */
+    case AFP_SETACL             : return "AFP_SETACL";           /* 74 */
+    case AFP_ACCESS             : return "AFP_ACCESS";           /* 75 */
+    case AFP_SPOTLIGHT_PRIVATE  : return "AFP_SPOTLIGHT_PRIVATE"; /* 76 */
+    case AFP_SYNCDIR            : return "AFP_SYNCDIR";                  /* 78 */
+    case AFP_SYNCFORK           : return "AFP_SYNCFORK";             /* 79 */
+       }
        return "not yet defined";                                                                 
 }
-#endif