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
195ed11f
...
195ed11f53f9fce1502a22781374a39adcc5e815
authored
1999-10-06 23:01:05 +0000
by
Sean 'Shaleh' Perry
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added SO_REUSEADDR socket option
1 parent
251a405a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
ChangeLog
pop3d/pop3d.c
ChangeLog
View file @
195ed11
...
...
@@ -4,6 +4,7 @@ Sean 'Shaleh' Perry <shaleh@debian.org> Wed, 6 Oct 1999 13:55:42 -0700
* changed "w+" to "w" in called to pop3_mainloop():ofile = fdopen()
why was it called with w+? It is only ever used for writing.
* catch EINTR in call to accept() (play nice w/ our UNIX friends)
* set SO_REUSEADDR on daemon's socket
Sean 'Shaleh' Perry <shaleh@debian.org> Tue, 5 Oct 1999 23:06:33 -0700
...
...
pop3d/pop3d.c
View file @
195ed11
...
...
@@ -303,12 +303,14 @@ pop3_daemon (unsigned int maxchildren)
syslog
(
LOG_ERR
,
"socket: %s"
,
strerror
(
errno
));
exit
(
-
1
);
}
size
=
1
;
/* use size here to avoid making a new variable */
setsockopt
(
listenfd
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
size
,
sizeof
(
size
));
size
=
sizeof
(
server
);
memset
(
&
server
,
0
,
size
);
server
.
sin_family
=
AF_INET
;
server
.
sin_addr
.
s_addr
=
htonl
(
INADDR_ANY
);
server
.
sin_port
=
htonl
(
port
);
if
(
bind
(
listenfd
,
(
SA
*
)
&
server
,
size
)
==
-
1
)
{
syslog
(
LOG_ERR
,
"bind: %s"
,
strerror
(
errno
));
...
...
Please
register
or
sign in
to post a comment