chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
main: rename systemd.default= to systemd.unit=
[elogind.git]
/
src
/
socket.c
diff --git
a/src/socket.c
b/src/socket.c
index ef7674f46386fae40a3093316ae51a105ec1f382..19f1d2209736a6afe878d6ac44ae2cb73488008a 100644
(file)
--- a/
src/socket.c
+++ b/
src/socket.c
@@
-58,7
+58,6
@@
static void socket_init(Unit *u) {
assert(u);
assert(u->meta.load_state == UNIT_STUB);
assert(u);
assert(u->meta.load_state == UNIT_STUB);
- s->timer_watch.type = WATCH_INVALID;
s->backlog = SOMAXCONN;
s->timeout_usec = DEFAULT_TIMEOUT_USEC;
s->directory_mode = 0755;
s->backlog = SOMAXCONN;
s->timeout_usec = DEFAULT_TIMEOUT_USEC;
s->directory_mode = 0755;
@@
-1068,7
+1067,7
@@
static int socket_serialize(Unit *u, FILE *f, FDSet *fds) {
if ((r = socket_address_print(&p->address, &t)) < 0)
return r;
if ((r = socket_address_print(&p->address, &t)) < 0)
return r;
- unit_serialize_item_format(u, f, "socket", "%i %
s", copy
, t);
+ unit_serialize_item_format(u, f, "socket", "%i %
i %s", copy, p->address.type
, t);
free(t);
} else {
assert(p->type == SOCKET_FIFO);
free(t);
} else {
assert(p->type == SOCKET_FIFO);
@@
-1146,15
+1145,15
@@
static int socket_deserialize_item(Unit *u, const char *key, const char *value,
}
} else if (streq(key, "socket")) {
}
} else if (streq(key, "socket")) {
- int fd, skip = 0;
+ int fd,
type,
skip = 0;
SocketPort *p;
SocketPort *p;
- if (sscanf(value, "%i %
n", &fd, &skip) < 1 || fd
< 0 || !fdset_contains(fds, fd))
+ if (sscanf(value, "%i %
i %n", &fd, &type, &skip) < 2 || fd < 0 || type
< 0 || !fdset_contains(fds, fd))
log_debug("Failed to parse socket value %s", value);
else {
LIST_FOREACH(port, p, s->ports)
log_debug("Failed to parse socket value %s", value);
else {
LIST_FOREACH(port, p, s->ports)
- if (socket_address_is(&p->address, value+skip))
+ if (socket_address_is(&p->address, value+skip
, type
))
break;
if (p) {
break;
if (p) {