Compare commits

..

3 Commits

Author SHA1 Message Date
Laurence Withers 5586bf98f9 Bump version 2006-12-01 19:26:08 +00:00
Laurence Withers 2b14f82040 Always log to syslog, regardless of mode 2006-12-01 19:25:46 +00:00
Laurence Withers d0ec200a27 Unlink any existing socket before binding 2006-12-01 19:22:42 +00:00
2 changed files with 4 additions and 4 deletions

View File

@ -29,9 +29,8 @@ void do_log(int level, const char* fmt, ...)
va_start(va, fmt);
if(Daemon) {
vsyslog(level, fmt, va);
} else {
if(!Daemon) {
FILE* out = stdout;
switch(level) {
@ -128,6 +127,7 @@ int setup_socket(const char* name, int perms)
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, name); // main() ensures it is less than UNIX_PATH_MAX bytes
unlink(name); // unlink any existing socket, but ignore errors
if(bind(fd, (struct sockaddr*)&addr, sizeof(addr))) {
LOG(LOG_CRIT, "Couldn't bind socket (fd %d) to file ``%s'' - %s (%d).",
fd, name, strerror(errno), errno);

View File

@ -12,7 +12,7 @@
# suffixed with a string.
VERMAJOR=1
VERMINOR=1
VERMICRO=0
VERMICRO=1
VEREXTRA=""
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;