summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-12 11:20:06 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-12 14:35:42 +0100
commit0b8eeb1edc8ece6538c88c026b90439d2823bd9e (patch)
treed5550c1dc95a980e6dbabe028c9dfbbfa54600a2 /source3
parentbf35606bbf8bd8146238c50c1e10d583ca0ab443 (diff)
downloadsamba-0b8eeb1edc8ece6538c88c026b90439d2823bd9e.tar.gz
samba-0b8eeb1edc8ece6538c88c026b90439d2823bd9e.tar.bz2
samba-0b8eeb1edc8ece6538c88c026b90439d2823bd9e.zip
s3:smbd: pass down smbd_server_connection via smbd_echo_state
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 3f710c090c..0e15e32d35 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2664,7 +2664,8 @@ static void smbd_echo_writer_done(struct tevent_req *req)
smbd_echo_activate_writer(state);
}
-static bool smbd_echo_reply(uint8_t *inbuf, size_t inbuf_len,
+static bool smbd_echo_reply(struct smbd_echo_state *state,
+ uint8_t *inbuf, size_t inbuf_len,
uint32_t seqnum)
{
struct smb_request req;
@@ -2685,12 +2686,12 @@ static bool smbd_echo_reply(uint8_t *inbuf, size_t inbuf_len,
DEBUG(10, ("Got short packet: %d bytes\n", (int)inbuf_len));
return false;
}
- if (!valid_smb_header(smbd_server_conn, inbuf)) {
+ if (!valid_smb_header(state->sconn, inbuf)) {
DEBUG(10, ("Got invalid SMB header\n"));
return false;
}
- if (!init_smb_request(&req, smbd_server_conn, inbuf, 0, false,
+ if (!init_smb_request(&req, state->sconn, inbuf, 0, false,
seqnum)) {
return false;
}
@@ -2814,7 +2815,7 @@ static void smbd_echo_got_packet(struct tevent_req *req)
exit(1);
}
- reply = smbd_echo_reply((uint8_t *)buf, buflen, seqnum);
+ reply = smbd_echo_reply(state, (uint8_t *)buf, buflen, seqnum);
if (!reply) {
size_t num_pending;
struct iovec *tmp;