Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
e8e71920
...
e8e71920f6a3c8821427cf9450a8476f6c01411e
authored
2001-11-05 13:41:08 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use mu_syslog_error_printer. Fixed misplaced if condition.
1 parent
65c56212
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
comsat/comsat.c
comsat/comsat.c
View file @
e8e7192
...
...
@@ -86,7 +86,6 @@ int timeout = 0;
int
maxlines
=
5
;
char
hostname
[
MAXHOSTNAMELEN
];
static
int
syslog_error_printer
(
const
char
*
fmt
,
va_list
ap
);
static
void
comsat_init
(
void
);
static
void
comsat_daemon_init
(
void
);
static
void
comsat_daemon
(
int
port
);
...
...
@@ -156,7 +155,7 @@ main(int argc, char **argv)
/* Set up error messaging */
openlog
(
"gnu-comsat"
,
LOG_PID
,
LOG_LOCAL1
);
mu_error_set_print
(
syslog_error_printer
);
mu_error_set_print
(
mu_
syslog_error_printer
);
if
(
config_file
)
read_config
(
config_file
);
...
...
@@ -375,7 +374,7 @@ comsat_main (int fd)
/* Parse the buffer */
p
=
strchr
(
buffer
,
'@'
);
if
(
!
p
&&
!
isspace
(
*
p
)
)
if
(
!
p
)
{
syslog
(
LOG_ERR
,
"malformed input: %s"
,
buffer
);
return
1
;
...
...
@@ -385,13 +384,13 @@ comsat_main (int fd)
offset
=
strtoul
(
p
,
&
endp
,
0
);
switch
(
*
endp
)
{
case
' '
:
case
0
:
break
;
case
':'
:
path
=
endp
+
1
;
break
;
default:
if
(
!
isspace
(
*
endp
))
syslog
(
LOG_ERR
,
"malformed input: %s@%s (near %s)"
,
buffer
,
p
,
endp
);
}
...
...
@@ -537,7 +536,7 @@ notify_user (char *user, char *device, char *path, off_t offset)
/* Take care to clear eighth bit, so we won't upset some stupid terminals */
#define LB(c) ((c)&0x7f)
nlines
=
maxlines
;
/*FIXME:configurable*/
nlines
=
maxlines
;
if
(
header_aget_value
(
header
,
MU_HEADER_FROM
,
&
p
)
==
0
)
{
fprintf
(
fp
,
"From: "
);
...
...
@@ -658,13 +657,6 @@ change_user (char *user)
setuid
(
pw
->
pw_uid
);
}
static
int
syslog_error_printer
(
const
char
*
fmt
,
va_list
ap
)
{
vsyslog
(
LOG_CRIT
,
fmt
,
ap
);
return
0
;
}
void
help
()
{
...
...
Please
register
or
sign in
to post a comment