X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fsocket-util.c;h=4a1b3d8b515536e97fd0b186ceeed5d8ab276a32;hp=0c9fc9f999e939b1c3fe188ef2b8c51a790433d1;hb=27ca8d7a250915b290cf89c195e383a8abab35d5;hpb=46018844bca3abf16ac38bdf0af8e48ee95d03f2;ds=sidebyside diff --git a/src/socket-util.c b/src/socket-util.c index 0c9fc9f99..4a1b3d8b5 100644 --- a/src/socket-util.c +++ b/src/socket-util.c @@ -443,7 +443,7 @@ bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) { return true; } -bool socket_address_is(const SocketAddress *a, const char *s) { +bool socket_address_is(const SocketAddress *a, const char *s, int type) { struct SocketAddress b; assert(a); @@ -452,6 +452,8 @@ bool socket_address_is(const SocketAddress *a, const char *s) { if (socket_address_parse(&b, s) < 0) return false; + b.type = type; + return socket_address_equal(a, &b); }