summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-09-13 13:13:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:44 -0500
commit360f125f255fd7d5a172d012c00b3cfbff5a6989 (patch)
treee923d87fa67562dca791eecd450ea10243fbc389 /source4/smb_server
parentcff1f3e8a961ffc15c09ef5de1aa965122e6e4f6 (diff)
downloadsamba-360f125f255fd7d5a172d012c00b3cfbff5a6989.tar.gz
samba-360f125f255fd7d5a172d012c00b3cfbff5a6989.tar.bz2
samba-360f125f255fd7d5a172d012c00b3cfbff5a6989.zip
r2326: remove definition and usage of struct socket_context
metze (This used to be commit 1854907da8d577db41de9aa14573d5c8c0092f47)
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/request.c4
-rw-r--r--source4/smb_server/service.c3
-rw-r--r--source4/smb_server/smb_server.c6
3 files changed, 7 insertions, 6 deletions
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c
index fad1d25bba..a5ca789a39 100644
--- a/source4/smb_server/request.c
+++ b/source4/smb_server/request.c
@@ -49,7 +49,7 @@ struct smbsrv_request *init_smb_request(struct smbsrv_connection *smb_conn)
{
struct smbsrv_request *req;
- smb_conn->connection->socket->pkt_count++;
+ smb_conn->socket.pkt_count++;
req = talloc_p(smb_conn, struct smbsrv_request);
if (!req) {
@@ -251,7 +251,7 @@ void req_send_reply_nosign(struct smbsrv_request *req)
_smb_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
}
- if (write_data(req->smb_conn->connection->socket->fde->fd, req->out.buffer, req->out.size) != req->out.size) {
+ if (write_data(req->smb_conn->connection->event.fde->fd, req->out.buffer, req->out.size) != req->out.size) {
smbsrv_terminate_connection(req->smb_conn, "failed to send reply\n");
}
diff --git a/source4/smb_server/service.c b/source4/smb_server/service.c
index e42b803690..54e96476fe 100644
--- a/source4/smb_server/service.c
+++ b/source4/smb_server/service.c
@@ -249,7 +249,8 @@ close a cnum
void close_cnum(struct smbsrv_tcon *tcon)
{
DEBUG(3,("%s closed connection to service %s\n",
- tcon->smb_conn->connection->socket->client_addr, lp_servicename(SNUM(tcon))));
+ get_socket_addr(tcon, tcon->smb_conn->connection->event.fde->fd),
+ lp_servicename(SNUM(tcon))));
/* tell the ntvfs backend that we are disconnecting */
tcon->ntvfs_ops->disconnect(tcon);
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index cc43af8124..228ff4f4a3 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -64,7 +64,7 @@ static struct smbsrv_request *receive_smb_request(struct smbsrv_connection *smb_
char header[4];
struct smbsrv_request *req;
- len = read_data(smb_conn->connection->socket->fde->fd, header, 4);
+ len = read_data(smb_conn->connection->event.fde->fd, header, 4);
if (len != 4) {
return NULL;
}
@@ -82,7 +82,7 @@ static struct smbsrv_request *receive_smb_request(struct smbsrv_connection *smb_
/* fill in the already received header */
memcpy(req->in.buffer, header, 4);
- len2 = read_data(smb_conn->connection->socket->fde->fd, req->in.buffer + NBT_HDR_SIZE, len);
+ len2 = read_data(smb_conn->connection->event.fde->fd, req->in.buffer + NBT_HDR_SIZE, len);
if (len2 != len) {
return NULL;
}
@@ -831,7 +831,7 @@ void smbsrv_accept(struct server_connection *conn)
/* set an initial client name based on its IP address. This will be replaced with
the netbios name later if it gives us one */
- socket_addr = get_socket_addr(smb_conn, conn->socket->fde->fd);
+ socket_addr = get_socket_addr(smb_conn, conn->event.fde->fd);
sub_set_remote_machine(socket_addr);
/* now initialise a few default values associated with this smb socket */