#include "fork.h"
#include "uam_auth.h"
#include "afp_zeroconf.h"
-#include "spotlight.h"
#define AFP_LISTENERS 32
#define FDSET_SAFETY 5
int main(int ac, char **av)
{
- fd_set rfds;
- void *ipc;
struct sigaction sv;
sigset_t sigs;
int ret;
afp_exit(EXITERR_SYS);
}
#endif
+
+ sv.sa_handler = SIG_IGN;
+ sigemptyset( &sv.sa_mask );
+ if (sigaction(SIGPIPE, &sv, NULL ) < 0 ) {
+ LOG(log_error, logtype_afpd, "main: sigaction: %s", strerror(errno) );
+ afp_exit(EXITERR_SYS);
+ }
sv.sa_handler = afp_goaway; /* handler for all sigs */
if (reloadconfig) {
nologin++;
- auth_unload();
+
fd_reset_listening_sockets(&obj);
LOG(log_info, logtype_afpd, "re-reading configuration file");
configfree(&obj, NULL);
+ afp_config_free(&obj);
+
+ if (afp_config_parse(&obj, "afpd") != 0)
+ afp_exit(EXITERR_CONF);
+
if (configinit(&obj) != 0) {
LOG(log_error, logtype_afpd, "config re-read: no servers configured");
afp_exit(EXITERR_CONF);
switch (polldata[i].fdtype) {
case LISTEN_FD:
- if (child = dsi_start(&obj, (DSI *)polldata[i].data, server_children)) {
+ if ((child = dsi_start(&obj, (DSI *)polldata[i].data, server_children))) {
/* Add IPC fd to select fd set */
fdset_add_fd(obj.options.connections + AFP_LISTENERS + FDSET_SAFETY,
&fdset,