Fix another segfault and make smbfilter run again.
authorMichael Adam <obnox@samba.org>
Tue, 6 Nov 2007 00:09:24 +0000 (01:09 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 6 Nov 2007 00:10:05 +0000 (01:10 +0100)
This fix is not complete yet (loop after "client closed connection")
but at least it starts again...

Micheal

source/utils/smbfilter.c

index 55c0c4dec2e37619fab937514c20fc667c329aeb..79b887388854627cbfa397117c152f59e871fcea 100644 (file)
@@ -176,11 +176,13 @@ static void start_filter(char *desthost)
 {
        int s, c;
        struct sockaddr_storage dest_ss;
+       struct sockaddr_storage my_ss;
 
        CatchChild();
 
        /* start listening on port 445 locally */
-       s = open_socket_in(SOCK_STREAM, 445, 0, 0, True);
+       my_ss.ss_family = AF_INET;
+       s = open_socket_in(SOCK_STREAM, 445, 0, &my_ss, True);
        
        if (s == -1) {
                d_printf("bind failed\n");