diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c index 64f8910e6..bedb4114d 100644 --- a/src/util.c +++ b/src/util.c @@ -172,10 +172,10 @@ make_unix_socket (const char *path, struct sockaddr_un *addr, gboolean is_server } if (is_server) { setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, (const void *) &on, sizeof(int)); - r = bind (fd, (struct sockaddr *)&sin, sizeof (struct sockaddr_in)); + r = bind (fd, (struct sockaddr *)addr, sizeof (struct sockaddr_in)); } else { - r = connect (fd, (struct sockaddr *)&sin, sizeof (struct sockaddr_in)); + r = connect (fd, (struct sockaddr *)addr, sizeof (struct sockaddr_in)); } if (r == -1) { |