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
7c8e0be6
...
7c8e0be62eecb7e8bbc46fd9eee50172a0d3c29b
authored
2003-01-18 15:01:46 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(imap4d_mainloop): Changed proto following that of pop3.
1 parent
3784bb2b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
imap4d/imap4d.c
imap4d/imap4d.c
View file @
7c8e0be
...
...
@@ -75,10 +75,9 @@ static const char *imap4d_capa[] = {
NULL
};
static
int
imap4d_mainloop
__P
((
int
,
int
));
static
void
imap4d_daemon_init
__P
((
void
));
static
void
imap4d_daemon
__P
((
unsigned
int
,
unsigned
int
));
static
int
imap4d_mainloop
__P
((
int
,
int
));
static
int
imap4d_mainloop
__P
((
int
,
FILE
*
,
FILE
*
));
static
error_t
imap4d_parse_opt
(
int
key
,
char
*
arg
,
struct
argp_state
*
state
)
...
...
@@ -198,7 +197,7 @@ main (int argc, char **argv)
imap4d_daemon
(
daemon_param
.
maxchildren
,
daemon_param
.
port
);
/* exit (0) -- no way out of daemon except a signal. */
else
status
=
imap4d_mainloop
(
fileno
(
stdin
),
fileno
(
stdout
)
);
status
=
imap4d_mainloop
(
fileno
(
stdin
),
stdin
,
stdout
);
/* Close the syslog connection and exit. */
closelog
();
...
...
@@ -207,7 +206,7 @@ main (int argc, char **argv)
}
static
int
imap4d_mainloop
(
int
infile
,
int
outfile
)
imap4d_mainloop
(
int
fd
,
FILE
*
infile
,
FILE
*
outfile
)
{
char
*
text
;
...
...
@@ -225,7 +224,7 @@ imap4d_mainloop (int infile, int outfile)
int
len
=
sizeof
cs
;
syslog
(
LOG_INFO
,
_
(
"Incoming connection opened"
));
if
(
getpeername
(
infile
,
(
struct
sockaddr
*
)
&
cs
,
&
len
)
<
0
)
if
(
getpeername
(
fd
,
(
struct
sockaddr
*
)
&
cs
,
&
len
)
<
0
)
syslog
(
LOG_ERR
,
_
(
"can't obtain IP address of client: %s"
),
strerror
(
errno
));
else
...
...
@@ -348,7 +347,9 @@ imap4d_daemon (unsigned int maxchildren, unsigned int port)
{
int
status
;
close
(
listenfd
);
status
=
imap4d_mainloop
(
connfd
,
connfd
);
status
=
imap4d_mainloop
(
connfd
,
fdopen
(
connfd
,
"r"
),
fdopen
(
connfd
,
"w"
));
closelog
();
exit
(
status
);
}
...
...
Please
register
or
sign in
to post a comment