diff options
author | Daniel Mack <github@zonque.org> | 2016-01-22 09:06:20 +0100 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2016-01-22 09:06:20 +0100 |
commit | 808abf0969aa33abbc45ae6f6059b4c597a5b7a3 (patch) | |
tree | 95b52461cf20de673a1ac848e8eba0da383d6c73 /src/basic/socket-label.c | |
parent | e77435f2b09f4e9e7f2b12cc89273ef53910f3e7 (diff) | |
parent | 530a071ab582cd5852cd7186e084136d3369d54a (diff) |
Merge pull request #2411 from ssahani/activate4
systemd-activate: Add support for datagram socket
Diffstat (limited to 'src/basic/socket-label.c')
-rw-r--r-- | src/basic/socket-label.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/basic/socket-label.c b/src/basic/socket-label.c index e169439e04..bd206586ce 100644 --- a/src/basic/socket-label.c +++ b/src/basic/socket-label.c @@ -147,7 +147,7 @@ int socket_address_listen( return r; } -int make_socket_fd(int log_level, const char* address, int flags) { +int make_socket_fd(int log_level, const char* address, int type, int flags) { SocketAddress a; int fd, r; @@ -155,7 +155,9 @@ int make_socket_fd(int log_level, const char* address, int flags) { if (r < 0) return log_error_errno(r, "Failed to parse socket address \"%s\": %m", address); - fd = socket_address_listen(&a, flags, SOMAXCONN, SOCKET_ADDRESS_DEFAULT, + a.type = type; + + fd = socket_address_listen(&a, type | flags, SOMAXCONN, SOCKET_ADDRESS_DEFAULT, NULL, false, false, false, 0755, 0644, NULL); if (fd < 0 || log_get_max_level() >= log_level) { _cleanup_free_ char *p = NULL; |