Skip to content

Commit

Permalink
net/SocketConfig: remove constructor, allowing designated initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed May 3, 2024
1 parent 3eb5340 commit 90d6d99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions src/Instance.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ MakeListener(SocketAddress address)
{
constexpr int socktype = SOCK_SEQPACKET;

SocketConfig config(address);
config.mode = 0666;

/* we want to receive the client's UID */
config.pass_cred = true;

config.listen = 64;
const SocketConfig config{
.bind_address = AllocatedSocketAddress{address},
.listen = 64,
.mode = 0666,

/* we want to receive the client's UID */
.pass_cred = true,
};

return config.Create(socktype);
}
Expand Down

0 comments on commit 90d6d99

Please sign in to comment.