Use functions from logger.c
This commit is contained in:
parent
2f2defc452
commit
e169244e4b
2 changed files with 10 additions and 10 deletions
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: process.c,v 1.1.2.55 2003/07/17 15:06:26 guus Exp $
|
$Id: process.c,v 1.1.2.56 2003/07/21 14:47:43 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
@ -86,7 +86,7 @@ void cleanup_and_exit(int c)
|
||||||
|
|
||||||
logger(LOG_NOTICE, _("Terminating"));
|
logger(LOG_NOTICE, _("Terminating"));
|
||||||
|
|
||||||
closelog();
|
closelogger();
|
||||||
exit(c);
|
exit(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ int detach(void)
|
||||||
|
|
||||||
/* If we succeeded in doing that, detach */
|
/* If we succeeded in doing that, detach */
|
||||||
|
|
||||||
closelog();
|
closelogger();
|
||||||
|
|
||||||
if(do_detach) {
|
if(do_detach) {
|
||||||
if(daemon(0, 0) < 0) {
|
if(daemon(0, 0) < 0) {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: protocol_subnet.c,v 1.1.4.12 2003/07/17 15:06:27 guus Exp $
|
$Id: protocol_subnet.c,v 1.1.4.13 2003/07/21 14:47:43 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
@ -58,7 +58,7 @@ int add_subnet_h(connection_t *c)
|
||||||
cp();
|
cp();
|
||||||
|
|
||||||
if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
|
if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_SUBNET", c->name,
|
logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_SUBNET", c->name,
|
||||||
c->hostname);
|
c->hostname);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ int add_subnet_h(connection_t *c)
|
||||||
/* Check if owner name is a valid */
|
/* Check if owner name is a valid */
|
||||||
|
|
||||||
if(check_id(name)) {
|
if(check_id(name)) {
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ADD_SUBNET", c->name,
|
logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ADD_SUBNET", c->name,
|
||||||
c->hostname, _("invalid name"));
|
c->hostname, _("invalid name"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ int add_subnet_h(connection_t *c)
|
||||||
s = str2net(subnetstr);
|
s = str2net(subnetstr);
|
||||||
|
|
||||||
if(!s) {
|
if(!s) {
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ADD_SUBNET", c->name,
|
logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ADD_SUBNET", c->name,
|
||||||
c->hostname, _("invalid subnet string"));
|
c->hostname, _("invalid subnet string"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ int del_subnet_h(connection_t *c)
|
||||||
cp();
|
cp();
|
||||||
|
|
||||||
if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
|
if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_SUBNET", c->name,
|
logger(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_SUBNET", c->name,
|
||||||
c->hostname);
|
c->hostname);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ int del_subnet_h(connection_t *c)
|
||||||
/* Check if owner name is a valid */
|
/* Check if owner name is a valid */
|
||||||
|
|
||||||
if(check_id(name)) {
|
if(check_id(name)) {
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s): %s"), "DEL_SUBNET", c->name,
|
logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "DEL_SUBNET", c->name,
|
||||||
c->hostname, _("invalid name"));
|
c->hostname, _("invalid name"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ int del_subnet_h(connection_t *c)
|
||||||
s = str2net(subnetstr);
|
s = str2net(subnetstr);
|
||||||
|
|
||||||
if(!s) {
|
if(!s) {
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s): %s"), "DEL_SUBNET", c->name,
|
logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "DEL_SUBNET", c->name,
|
||||||
c->hostname, _("invalid subnet string"));
|
c->hostname, _("invalid subnet string"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue