-dnl $Id: configure.in,v 1.212 2009-02-27 09:14:40 franklahm Exp $
+dnl $Id: configure.in,v 1.213 2009-03-20 09:10:25 franklahm Exp $
dnl configure.in for netatalk
AC_INIT(etc/afpd/main.c)
]
)
+AC_MSG_CHECKING([whether to enable debugging with debuggers])
+AC_ARG_ENABLE(debugging,
+ [ --enable-debugging disable SIGALRM timers and DSI tickles (eg for debugging with gdb/dbx/...)],[
+ if test "$enableval" != "no"; then
+ if test "$enableval" = "yes"; then
+ AC_DEFINE(DEBUGGING, 1, [Define if you want to disable SIGALRM timers and DSI tickles])
+ else
+ AC_DEFINE_UNQUOTED(DEBUGGING, $enableval, [Define if you want to disable SIGALRM timers and DSI tickles])
+ fi
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ],[
+ AC_MSG_RESULT([no])
+ ]
+)
+
+
afp3=no
afp3set=no
AC_MSG_CHECKING([whether AFP 3.x calls should be enabled])
/*
- * $Id: afp_dsi.c,v 1.34 2009-02-27 09:14:40 franklahm Exp $
+ * $Id: afp_dsi.c,v 1.35 2009-03-20 09:10:25 franklahm Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
afp_dsi_die(EXITERR_SYS);
}
+#ifndef DEBUGGING
/* tickle handler */
action.sa_handler = alarm_handler;
sigemptyset(&action.sa_mask);
(setitimer(ITIMER_REAL, &dsi->timer, NULL) < 0)) {
afp_dsi_die(EXITERR_SYS);
}
+#endif /* DEBUGGING */
#ifdef DEBUG1
fault_setup((void (*)(void *))afp_dsi_die);
dsi_tickle(dsi);
continue;
} else if (!(child.flags & CHILD_DIE)) { /* reset tickle timer */
+#ifndef DEBUGGING
setitimer(ITIMER_REAL, &dsi->timer, NULL);
+#endif
}
switch(cmd) {
case DSIFUNC_CLOSE:
/*
- * $Id: dsi_tcp.c,v 1.12 2007-03-25 15:51:50 didg Exp $
+ * $Id: dsi_tcp.c,v 1.13 2009-03-20 09:10:25 franklahm Exp $
*
* Copyright (c) 1997, 1998 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved. See COPYRIGHT.
struct sigaction newact, oldact;
u_int8_t block[DSI_BLOCKSIZ];
size_t stored;
-
+
/* reset signals */
server_reset_signal();
+#ifndef DEBUGGING
/* install an alarm to deal with non-responsive connections */
newact.sa_handler = timeout_handler;
sigemptyset(&newact.sa_mask);
LOG(log_error, logtype_default, "dsi_tcp_open: %s", strerror(errno));
exit(EXITERR_SYS);
}
+#endif
/* read in commands. this is similar to dsi_receive except
* for the fact that we do some sanity checking to prevent
}
/* stop timer and restore signal handler */
+#ifndef DEBUGGING
memset(&timer, 0, sizeof(timer));
setitimer(ITIMER_REAL, &timer, NULL);
sigaction(SIGALRM, &oldact, NULL);
-
+#endif
LOG(log_info, logtype_default,"ASIP session:%u(%d) from %s:%u(%d)",
ntohs(dsi->server.sin_port), dsi->serversock,
inet_ntoa(dsi->client.sin_addr), ntohs(dsi->client.sin_port),