summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-11-11 20:01:58 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-11-11 20:01:58 +0300
commitfe5bfee09fe3d28839955b781cbb9adad24ec828 (patch)
tree75a9049cf793445caf5fb391d7ff20c5ed34573c /src
parent06496123199f364065fa1e75bd4cd9d89304070d (diff)
downloadrspamd-fe5bfee09fe3d28839955b781cbb9adad24ec828.tar.gz
rspamd-fe5bfee09fe3d28839955b781cbb9adad24ec828.zip
* Fix addrlen of sockaddr_un (previous was a mistake)
Diffstat (limited to 'src')
-rw-r--r--src/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 732d67386..b431a9116 100644
--- a/src/util.c
+++ b/src/util.c
@@ -258,10 +258,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 *)addr, sizeof (struct sockaddr_in));
+ r = bind (fd, (struct sockaddr *)addr, SUN_LEN (addr));
}
else {
- r = connect (fd, (struct sockaddr *)addr, sizeof (struct sockaddr_in));
+ r = connect (fd, (struct sockaddr *)addr, SUN_LEN (addr));
}
if (r == -1) {