Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ReadMailReallyFast
code
Commits
0cc9454a
"git@git.chaotikum.org:chaotikum/website.git" did not exist on "bffe72db808cfcc3f9f3430b483deb3f80e3894a"
Commit
0cc9454a
authored
2 years ago
by
Leon Dietrich
Browse files
Options
Downloads
Patches
Plain Diff
fix: unix address generation
parent
abc60993
No related branches found
No related tags found
No related merge requests found
Pipeline
#7704
failed
2 years ago
Stage: prebuild
Stage: build
Stage: testing
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/net/sock_address_factory.cpp
+5
-1
5 additions, 1 deletion
src/net/sock_address_factory.cpp
test/address_tests.cpp
+1
-1
1 addition, 1 deletion
test/address_tests.cpp
with
6 additions
and
2 deletions
src/net/sock_address_factory.cpp
+
5
−
1
View file @
0cc9454a
...
...
@@ -166,7 +166,11 @@ namespace rmrf::net {
if
(
socket_type
==
socket_t
::
UNIX
)
{
sockaddr_un
storage
;
strncpy
(
storage
.
sun_path
,
interface_description
.
c_str
(),
sizeof
(
storage
.
sun_path
));
std
::
list
<
socketaddr
>
l
=
{
socketaddr
{
storage
}};
// Required as the automatic initialization of sockaddr_un is broken on linux.
// This will be optimized out on platforms where it is not.
((
sockaddr
*
)
&
storage
)
->
sa_family
=
AF_UNIX
;
const
socketaddr
sa
{
storage
};
std
::
list
<
socketaddr
>
l
=
{
sa
};
return
l
;
}
...
...
This diff is collapsed.
Click to expand it.
test/address_tests.cpp
+
1
−
1
View file @
0cc9454a
...
...
@@ -65,5 +65,5 @@ BOOST_AUTO_TEST_CASE(Socketaddr_comparison) {
BOOST_AUTO_TEST_CASE
(
Unix_socket_construction_test
)
{
const
auto
sa
=
get_first_general_socketaddr
(
"/tmp/9Lq7BNBnBycd6nxy.socket"
,
""
,
socket_t
::
UNIX
);
BOOST_CHECK_EQUAL
(
sa
.
str
(),
"FileSocket /tmp/9Lq7BNBnBycd6nxy.socket"
);
BOOST_CHECK_EQUAL
(
sa
.
str
(),
"
SocketAddress:
FileSocket /tmp/9Lq7BNBnBycd6nxy.socket"
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment