r25510: Now we're returning the port instead of using a global,
authorJeremy Allison <jra@samba.org>
Fri, 5 Oct 2007 01:11:33 +0000 (01:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:31:11 +0000 (12:31 -0500)
remember to use ntohs. Hopefully will fix the build farm.
Jeremy.

source/lib/util_sock.c
source/libsmb/nmblib.c

index bcc1e8e15e54bae64d0d3fc01245b567f113e203..f77fcc9968bb5a9a39ed3e06baa79b5cc24de507 100644 (file)
@@ -319,12 +319,12 @@ ssize_t read_udp_v4_socket(int fd,
        }
 
        if (psa->ss_family != AF_INET) {
-               DEBUG(2,("read_udp_v4_socket:: invalid address family %d "
+               DEBUG(2,("read_udp_v4_socket: invalid address family %d "
                        "(not IPv4)\n", (int)psa->ss_family));
                return 0;
        }
 
-       DEBUG(10,("read_udp_socket: ip %s port %d read: %lu\n",
+       DEBUG(10,("read_udp_v4_socket: ip %s port %d read: %lu\n",
                        inet_ntoa(si->sin_addr),
                        si->sin_port,
                        (unsigned long)ret));
index 74deb91a73a1e1d414b3fd2c30e58b0c03f8a890..61e24eb6f9b282d10655294252bb4da40ac83e46 100644 (file)
@@ -789,7 +789,7 @@ struct packet_struct *read_packet(int fd,enum packet_type packet_type)
                        length,
                        packet_type,
                        si->sin_addr,
-                       si->sin_port);
+                       ntohs(si->sin_port));
        if (!packet)
                return NULL;