X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libatalk%2Fdsi%2Fdsi_getsess.c;h=fc2f06def28a4441b49f624bc1e33ea234283323;hb=ae97675aefb21e9e3039b759c688f5f1328cfa7e;hp=a348b41279063352dec31ea17653fdf2e5b75cc5;hpb=ecfc96169ab669b578e53fa8e13592934fe37788;p=netatalk.git diff --git a/libatalk/dsi/dsi_getsess.c b/libatalk/dsi/dsi_getsess.c index a348b412..fc2f06de 100644 --- a/libatalk/dsi/dsi_getsess.c +++ b/libatalk/dsi/dsi_getsess.c @@ -13,23 +13,11 @@ #include #include #include -#ifdef HAVE_UNISTD_H #include -#endif /* HAVE_UNISTD_H */ #include -/* POSIX.1 sys/wait.h check */ #include -#ifdef HAVE_SYS_WAIT_H #include -#endif /* HAVE_SYS_WAIT_H */ -#ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -#endif /* ! WEXITSTATUS */ -#ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif /* ! WIFEXITED */ - #include #include #include @@ -61,7 +49,7 @@ DSI *dsi_getsession(DSI *dsi, server_child *serv_children, switch (pid = dsi->proto_open(dsi)) { case -1: /* if we fail, just return. it might work later */ - LOG(log_error, logtype_default, "dsi_getsess: %s", strerror(errno)); + LOG(log_error, logtype_dsi, "dsi_getsess: %s", strerror(errno)); return dsi; case 0: /* child. mostly handled below. */ @@ -72,7 +60,7 @@ DSI *dsi_getsession(DSI *dsi, server_child *serv_children, /* using SIGQUIT is hokey, but the child might not have * re-established its signal handler for SIGTERM yet. */ if (server_child_add(children, CHILD_DSIFORK, pid) < 0) { - LOG(log_error, logtype_default, "dsi_getsess: %s", strerror(errno)); + LOG(log_error, logtype_dsi, "dsi_getsess: %s", strerror(errno)); dsi->header.dsi_flags = DSIFL_REPLY; dsi->header.dsi_code = DSIERR_SERVBUSY; dsi_send(dsi); @@ -88,7 +76,7 @@ DSI *dsi_getsession(DSI *dsi, server_child *serv_children, * actual count. */ if ((children->count >= children->nsessions) && (dsi->header.dsi_command == DSIFUNC_OPEN)) { - LOG(log_info, logtype_default, "dsi_getsess: too many connections"); + LOG(log_info, logtype_dsi, "dsi_getsess: too many connections"); dsi->header.dsi_flags = DSIFL_REPLY; dsi->header.dsi_code = DSIERR_TOOMANY; dsi_send(dsi); @@ -133,7 +121,7 @@ DSI *dsi_getsession(DSI *dsi, server_child *serv_children, break; default: /* just close */ - LOG(log_info, logtype_default, "DSIUnknown %d", dsi->header.dsi_command); + LOG(log_info, logtype_dsi, "DSIUnknown %d", dsi->header.dsi_command); dsi->proto_close(dsi); exit(EXITERR_CLNT); }