freebsd-ports/mail/pop3vscan/files/patch-scanner_trophie.c
Yen-Ming Lee 87e9e5b854 use SUN_LEN macro to calculate the actual length of an initialized sockaddr_un
Submitted by:	Edwin Groothuis <edwin@mavetju.org>
2003-06-29 13:21:20 +00:00

11 lines
487 B
C

--- scanner_trophie.c.orig Sun Jun 29 21:08:53 2003
+++ scanner_trophie.c Sun Jun 29 21:10:34 2003
@@ -61,7 +61,7 @@
if (trophie_fd!=-1 && connected==-1){
do_log(LOG_DEBUG, "Trying to connect to socket");
if (connect(trophie_fd, (struct sockaddr *)(&trophie_socket),
- sizeof(trophie_socket.sun_family) + strlen(config->virusscanner)) >= 0){
+ SUN_LEN(&trophie_socket)) >= 0){
connected=1;
do_log(LOG_DEBUG, "trophie_socket_connect connected");
return 0;