summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-12 14:25:02 +0200
committerVolker Lendecke <vl@samba.org>2009-04-12 14:51:15 +0200
commitdcda3ab8ca5447b04da7a95cc82965265687a8a5 (patch)
treeadfa5a360f6b340f98127cbdb950f9a99519a344 /source3
parentc344ad30435feb235b2423a6f066ab5eba30d2fb (diff)
downloadsamba-dcda3ab8ca5447b04da7a95cc82965265687a8a5.tar.gz
samba-dcda3ab8ca5447b04da7a95cc82965265687a8a5.tar.bz2
samba-dcda3ab8ca5447b04da7a95cc82965265687a8a5.zip
Reactivate get_socket_port
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/util_sock.c5
2 files changed, 2 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 678f087374..cc442422e8 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1358,6 +1358,7 @@ char *print_canonical_sockaddr(TALLOC_CTX *ctx,
const struct sockaddr_storage *pss);
void set_sockaddr_port(struct sockaddr *psa, uint16_t port);
const char *client_name(int fd);
+int get_socket_port(int fd);
const char *client_addr(int fd, char *addr, size_t addrlen);
const char *client_socket_addr(int fd, char *addr, size_t addr_len);
int client_socket_port(int fd);
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 5f9d4768ba..cbd7b983c7 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -208,13 +208,11 @@ static const char *get_socket_addr(int fd, char *addr_buf, size_t addr_len)
return print_sockaddr_len(addr_buf, addr_len, (struct sockaddr *)&sa, length);
}
-#if 0
-/* Not currently used. JRA. */
/****************************************************************************
Return the port number we've bound to on a socket.
****************************************************************************/
-static int get_socket_port(int fd)
+int get_socket_port(int fd)
{
struct sockaddr_storage sa;
socklen_t length = sizeof(sa);
@@ -239,7 +237,6 @@ static int get_socket_port(int fd)
}
return -1;
}
-#endif
const char *client_name(int fd)
{