/*
- * $Id: afp_config.c,v 1.22.6.4 2004-01-25 11:52:33 bfernhomberg Exp $
+ * $Id: afp_config.c,v 1.22.6.5 2004-04-27 22:47:32 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
#ifndef NO_DDP
static void asp_cleanup(const AFPConfig *config)
{
+ /* we need to stop tickle handler */
+ asp_stop_tickle();
nbp_unrgstr(config->obj.Obj, config->obj.Type, config->obj.Zone,
&config->obj.options.ddpaddr);
}
/*
- * $Id: main.c,v 1.20.4.2.2.6 2004-02-20 21:23:13 didg Exp $
+ * $Id: main.c,v 1.20.4.2.2.7 2004-04-27 22:47:32 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
if (config->server_cleanup)
config->server_cleanup(config);
+ /* configfree close atp socket used for DDP tickle, there's an issue
+ * with atp tid.
+ */
configfree(configs, NULL);
if (!(configs = configinit(&default_options))) {
LOG(log_error, logtype_afpd, "config re-read: no servers configured");
#define asp_wrtreply(a,b) asp_cmdreply((a), (b))
extern void asp_kill __P((int));
extern int asp_tickle __P((ASP, const u_int8_t, struct sockaddr_at *));
+extern void asp_stop_tickle __P((void));
#endif
/*
- * $Id: asp_getsess.c,v 1.7.8.2 2003-11-13 15:39:02 didg Exp $
+ * $Id: asp_getsess.c,v 1.7.8.3 2004-04-27 22:47:32 didg Exp $
*
* Copyright (c) 1990,1996 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
server_child_kill(children, CHILD_ASPFORK, sig);
}
+void asp_stop_tickle(void)
+{
+ if (server_asp && server_asp->inited) {
+ static const struct itimerval timer = {{0, 0}, {0, 0}};
+
+ setitimer(ITIMER_REAL, &timer, NULL);
+ }
+}
/*
* This call handles open, tickle, and getstatus requests. On a
if (!(children = server_children))
return NULL;
- if ((asp_ac = (struct asp_child **)
+ /* only calloc once */
+ if (!asp_ac && (asp_ac = (struct asp_child **)
calloc(server_children->nsessions, sizeof(struct asp_child *)))
== NULL)
return NULL;
if ((sigaction(SIGALRM, &action, NULL) < 0) ||
(setitimer(ITIMER_REAL, &timer, NULL) < 0)) {
free(asp_ac);
+ server_asp = asp_ac = NULL;
return NULL;
}