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
a4a37d7a
Commit
a4a37d7a
authored
Jul 21, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/StaticSocketAddress: remove unused method SetLocal()
parent
d1b1a8e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
37 deletions
+0
-37
StaticSocketAddress.cxx
src/net/StaticSocketAddress.cxx
+0
-29
StaticSocketAddress.hxx
src/net/StaticSocketAddress.hxx
+0
-8
No files found.
src/net/StaticSocketAddress.cxx
View file @
a4a37d7a
...
...
@@ -32,16 +32,8 @@
#include <algorithm>
#include <assert.h>
#include <string.h>
#ifdef WIN32
#include <ws2tcpip.h>
#else
#include <sys/un.h>
#include <sys/socket.h>
#endif
StaticSocketAddress
&
StaticSocketAddress
::
operator
=
(
SocketAddress
other
)
{
...
...
@@ -56,24 +48,3 @@ StaticSocketAddress::operator==(const StaticSocketAddress &other) const
return
size
==
other
.
size
&&
memcmp
(
&
address
,
&
other
.
address
,
size
)
==
0
;
}
#if defined(HAVE_UN) && !defined(__BIONIC__)
void
StaticSocketAddress
::
SetLocal
(
const
char
*
path
)
{
auto
&
sun
=
reinterpret_cast
<
struct
sockaddr_un
&>
(
address
);
const
size_t
path_length
=
strlen
(
path
);
// TODO: make this a runtime check
assert
(
path_length
<
sizeof
(
sun
.
sun_path
));
sun
.
sun_family
=
AF_LOCAL
;
memcpy
(
sun
.
sun_path
,
path
,
path_length
+
1
);
/* note: Bionic doesn't provide SUN_LEN() */
size
=
SUN_LEN
(
&
sun
);
}
#endif
src/net/StaticSocketAddress.hxx
View file @
a4a37d7a
...
...
@@ -31,7 +31,6 @@
#define STATIC_SOCKET_ADDRESS_HXX
#include "SocketAddress.hxx"
#include "Features.hxx"
#include "Compiler.h"
#include <assert.h>
...
...
@@ -57,13 +56,6 @@ public:
size
);
}
#if defined(HAVE_UN) && !defined(__BIONIC__)
/**
* Make this a "local" address (UNIX domain socket).
*/
void
SetLocal
(
const
char
*
path
);
#endif
operator
struct
sockaddr
*
()
{
return
reinterpret_cast
<
struct
sockaddr
*>
(
&
address
);
}
...
...
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