summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-14 10:22:12 +0200
committerVolker Lendecke <vl@samba.org>2010-08-16 13:13:10 +0200
commit96ae4570230d2d47e23da6909f6e21dd43a19868 (patch)
tree2227d283971d61991b7859ef05a8390e37eb00ee /source3/lib
parenta482b3e14ec4e3eada9c2477c9eae2bfbe017f53 (diff)
downloadsamba-96ae4570230d2d47e23da6909f6e21dd43a19868.tar.gz
samba-96ae4570230d2d47e23da6909f6e21dd43a19868.tar.bz2
samba-96ae4570230d2d47e23da6909f6e21dd43a19868.zip
s3: Remove get_client_fd()
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dummysmbd.c2
-rw-r--r--source3/lib/substitute.c13
-rw-r--r--source3/lib/util_sock.c8
3 files changed, 13 insertions, 10 deletions
diff --git a/source3/lib/dummysmbd.c b/source3/lib/dummysmbd.c
index ee88a78e7c..eb6bfe9474 100644
--- a/source3/lib/dummysmbd.c
+++ b/source3/lib/dummysmbd.c
@@ -23,7 +23,7 @@
#include "includes.h"
-int get_client_fd(void)
+int smbd_server_fd(void)
{
return -1;
}
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index dbb5f7d08a..e5f1b2dbdf 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -62,7 +62,7 @@ bool set_local_machine_name(const char *local_name, bool perm)
if (strequal(tmp_local_machine, "*SMBSERVER") ||
strequal(tmp_local_machine, "*SMBSERV") ) {
SAFE_FREE(local_machine);
- local_machine = SMB_STRDUP(client_socket_addr(get_client_fd(),
+ local_machine = SMB_STRDUP(client_socket_addr(smbd_server_fd(),
addr, sizeof(addr)) );
SAFE_FREE(tmp_local_machine);
return local_machine ? true : false;
@@ -609,7 +609,7 @@ static char *alloc_sub_basic(const char *smb_name, const char *domain_name,
break;
case 'I' : {
int offset = 0;
- client_addr(get_client_fd(), addr, sizeof(addr));
+ client_addr(smbd_server_fd(), addr, sizeof(addr));
if (strnequal(addr,"::ffff:",7)) {
offset = 7;
}
@@ -618,8 +618,10 @@ static char *alloc_sub_basic(const char *smb_name, const char *domain_name,
break;
}
case 'i':
- a_string = realloc_string_sub( a_string, "%i",
- client_socket_addr(get_client_fd(), addr, sizeof(addr)) );
+ a_string = realloc_string_sub(
+ a_string, "%i",
+ client_socket_addr(smbd_server_fd(),
+ addr, sizeof(addr)));
break;
case 'L' :
if ( StrnCaseCmp(p, "%LOGONSERVER%", strlen("%LOGONSERVER%")) == 0 ) {
@@ -635,7 +637,8 @@ static char *alloc_sub_basic(const char *smb_name, const char *domain_name,
a_string = realloc_string_sub(a_string, "%N", automount_server(smb_name));
break;
case 'M' :
- a_string = realloc_string_sub(a_string, "%M", client_name(get_client_fd()));
+ a_string = realloc_string_sub(
+ a_string, "%M", client_name(smbd_server_fd()));
break;
case 'R' :
a_string = realloc_string_sub(a_string, "%R", remote_proto);
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index ced76ebca9..bf04af10bd 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -466,7 +466,7 @@ NTSTATUS read_fd_with_timeout(int fd, char *buf,
if (readret == -1) {
save_errno = errno;
- if (fd == get_client_fd()) {
+ if (fd == smbd_server_fd()) {
/* Try and give an error message
* saying what client failed. */
DEBUG(0,("read_fd_with_timeout: "
@@ -505,7 +505,7 @@ NTSTATUS read_fd_with_timeout(int fd, char *buf,
if (selrtn == -1) {
save_errno = errno;
/* something is wrong. Maybe the socket is dead? */
- if (fd == get_client_fd()) {
+ if (fd == smbd_server_fd()) {
/* Try and give an error message saying
* what client failed. */
DEBUG(0,("read_fd_with_timeout: timeout "
@@ -539,7 +539,7 @@ NTSTATUS read_fd_with_timeout(int fd, char *buf,
if (readret == -1) {
save_errno = errno;
/* the descriptor is probably dead */
- if (fd == get_client_fd()) {
+ if (fd == smbd_server_fd()) {
/* Try and give an error message
* saying what client failed. */
DEBUG(0,("read_fd_with_timeout: timeout "
@@ -666,7 +666,7 @@ ssize_t write_data(int fd, const char *buffer, size_t N)
return ret;
}
- if (fd == get_client_fd()) {
+ if (fd == smbd_server_fd()) {
char addr[INET6_ADDRSTRLEN];
/*
* Try and give an error message saying what client failed.