Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
8672f302
Commit
8672f302
authored
May 05, 2014
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1011 from fichtner/abstract_freebsd_again
ipc: fail harder for abstract ipc on non-Linux
parents
b7454554
fff29a4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
ipc_address.cpp
src/ipc_address.cpp
+1
-11
Makefile.am
tests/Makefile.am
+1
-1
No files found.
src/ipc_address.cpp
View file @
8672f302
...
...
@@ -51,20 +51,16 @@ int zmq::ipc_address_t::resolve (const char *path_)
errno
=
ENAMETOOLONG
;
return
-
1
;
}
#if defined ZMQ_HAVE_LINUX
if
(
path_
[
0
]
==
'@'
&&
!
path_
[
1
])
{
errno
=
EINVAL
;
return
-
1
;
}
#endif
address
.
sun_family
=
AF_UNIX
;
strcpy
(
address
.
sun_path
,
path_
);
#if defined ZMQ_HAVE_LINUX
/* Abstract sockets on Linux start with '\0' */
/* Abstract sockets start with '\0' */
if
(
path_
[
0
]
==
'@'
)
*
address
.
sun_path
=
'\0'
;
#endif
return
0
;
}
...
...
@@ -76,15 +72,11 @@ int zmq::ipc_address_t::to_string (std::string &addr_)
}
std
::
stringstream
s
;
#if !defined ZMQ_HAVE_LINUX
s
<<
"ipc://"
<<
address
.
sun_path
;
#else
s
<<
"ipc://"
;
if
(
!
address
.
sun_path
[
0
]
&&
address
.
sun_path
[
1
])
s
<<
"@"
<<
address
.
sun_path
+
1
;
else
s
<<
address
.
sun_path
;
#endif
addr_
=
s
.
str
();
return
0
;
}
...
...
@@ -96,10 +88,8 @@ const sockaddr *zmq::ipc_address_t::addr () const
socklen_t
zmq
::
ipc_address_t
::
addrlen
()
const
{
#if defined ZMQ_HAVE_LINUX
if
(
!
address
.
sun_path
[
0
]
&&
address
.
sun_path
[
1
])
return
(
socklen_t
)
strlen
(
address
.
sun_path
+
1
)
+
sizeof
(
sa_family_t
)
+
1
;
#endif
return
(
socklen_t
)
sizeof
(
address
);
}
...
...
tests/Makefile.am
View file @
8672f302
...
...
@@ -146,5 +146,5 @@ TESTS = $(noinst_PROGRAMS)
XFAIL_TESTS
=
if
!ON_LINUX
XFAIL_TESTS
+=
XFAIL_TESTS
+=
test_abstract_ipc
endif
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