Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
54de8b8e
Commit
54de8b8e
authored
Aug 10, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/*, ...: use AF_LOCAL instead of AF_UNIX
parent
79695697
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
ClientNew.cxx
src/client/ClientNew.cxx
+1
-1
AllocatedSocketAddress.cxx
src/net/AllocatedSocketAddress.cxx
+1
-1
ToString.cxx
src/net/ToString.cxx
+1
-1
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+2
-2
No files found.
src/client/ClientNew.cxx
View file @
54de8b8e
...
...
@@ -65,7 +65,7 @@ client_new(EventLoop &loop, Partition &partition,
assert
(
fd
>=
0
);
#ifdef HAVE_LIBWRAP
if
(
address
.
GetFamily
()
!=
AF_
UNIX
)
{
if
(
address
.
GetFamily
()
!=
AF_
LOCAL
)
{
// TODO: shall we obtain the program name from argv[0]?
const
char
*
progname
=
"mpd"
;
...
...
src/net/AllocatedSocketAddress.cxx
View file @
54de8b8e
...
...
@@ -82,7 +82,7 @@ AllocatedSocketAddress::SetLocal(const char *path) noexcept
struct
sockaddr_un
*
sun
;
SetSize
(
sizeof
(
*
sun
)
-
sizeof
(
sun
->
sun_path
)
+
path_length
);
sun
=
(
struct
sockaddr_un
*
)
address
;
sun
->
sun_family
=
AF_
UNIX
;
sun
->
sun_family
=
AF_
LOCAL
;
memcpy
(
sun
->
sun_path
,
path
,
path_length
);
if
(
is_abstract
)
...
...
src/net/ToString.cxx
View file @
54de8b8e
...
...
@@ -116,7 +116,7 @@ std::string
ToString
(
SocketAddress
address
)
noexcept
{
#ifdef HAVE_UN
if
(
address
.
GetFamily
()
==
AF_
UNIX
)
if
(
address
.
GetFamily
()
==
AF_
LOCAL
)
/* return path of UNIX domain sockets */
return
LocalAddressToString
(
*
(
const
sockaddr_un
*
)
address
.
GetAddress
(),
address
.
GetSize
());
...
...
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
54de8b8e
...
...
@@ -42,7 +42,7 @@
#include <errno.h>
#ifdef HAVE_LIBWRAP
#include <sys/socket.h>
/* needed for AF_
UNIX
*/
#include <sys/socket.h>
/* needed for AF_
LOCAL
*/
#include <tcpd.h>
#endif
...
...
@@ -157,7 +157,7 @@ HttpdOutput::OnAccept(int fd, SocketAddress address, gcc_unused int uid)
connected */
#ifdef HAVE_LIBWRAP
if
(
address
.
GetFamily
()
!=
AF_
UNIX
)
{
if
(
address
.
GetFamily
()
!=
AF_
LOCAL
)
{
const
auto
hostaddr
=
ToString
(
address
);
// TODO: shall we obtain the program name from argv[0]?
const
char
*
progname
=
"mpd"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment