]> arthur.barton.de Git - netatalk.git/commitdiff
Fix afpd debugging.
authorsrittau <srittau>
Fri, 6 Jun 2003 19:43:12 +0000 (19:43 +0000)
committersrittau <srittau>
Fri, 6 Jun 2003 19:43:12 +0000 (19:43 +0000)
NEWS
etc/afpd/afp_dsi.c

diff --git a/NEWS b/NEWS
index 925e7f5de347b36ae2f1674b41e79a27d6be0b7e..949407b4794654641d041c090672e5c8f56bcdfd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Changes in 1.6.3
 ================
 
 * FIX: afpd: Files could be opened for writing on read-only filesystems.
+* FIX: afpd: Debugging using SIGUSR1 was broken. [Stefan Muenkner]
 * FIX: shell_utils: Don't distribute generated files.
 * FIX: aecho: -A option didn't work. [Chris Shiels]
 * FIX: Automake build fixes.
index 0566942bb3ed40ae859dd13a81ef32629a940941..a53e06413abeb52e8a4bf3f71adc074af200fbb3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.25 2002-10-11 14:18:23 didg Exp $
+ * $Id: afp_dsi.c,v 1.24.2.1 2003-06-06 19:43:12 srittau Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -102,11 +102,11 @@ static void afp_dsi_timedown()
     it.it_interval.tv_usec = 0;
     it.it_value.tv_sec = 300;
     it.it_value.tv_usec = 0;
-
     if ( setitimer( ITIMER_REAL, &it, 0 ) < 0 ) {
         LOG(log_error, logtype_afpd, "afp_timedown: setitimer: %s", strerror(errno) );
         afp_dsi_die(1);
     }
+
     memset(&sv, 0, sizeof(sv));
     sv.sa_handler = afp_dsi_die;
     sigemptyset( &sv.sa_mask );
@@ -132,8 +132,7 @@ static void alarm_handler()
     /* if we're in the midst of processing something,
        don't die. */
     if ((child.flags & CHILD_RUNNING) || (child.tickle++ < child.obj->options.timeout)) {
-        if (!pollvoltime(child.obj))
-            dsi_tickle(child.obj->handle);
+        dsi_tickle(child.obj->handle);
     } else { /* didn't receive a tickle. close connection */
         LOG(log_error, logtype_afpd, "afp_alarm: child timed out");
         afp_dsi_die(1);
@@ -149,7 +148,7 @@ void afp_set_debug (int sig)
 {
     char       fname[MAXPATHLEN];
 
-    snprintf(fname, MAXPATHLEN-1, "%safpd-debug-%d", P_tmpdir, getpid());
+    snprintf(fname, MAXPATHLEN-1, "%s/afpd-debug-%d", P_tmpdir, getpid());
     freopen(fname, "w", stdout);
     child.obj->options.flags |= OPTION_DEBUG;
 
@@ -236,9 +235,9 @@ void afp_over_dsi(AFPObj *obj)
             if (child.flags & CHILD_DIE)
                 dsi_tickle(dsi);
             continue;
-        } else if (!(child.flags & CHILD_DIE)) /* reset tickle timer */
+        } else if (!(child.flags & CHILD_DIE)) /* reset tickle timer */
             setitimer(ITIMER_REAL, &dsi->timer, NULL);
-        }
+
         switch(cmd) {
         case DSIFUNC_CLOSE:
             afp_dsi_close(obj);