1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

s3:smbd: use sconn->client->connections in keepalive_fn()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-09-15 04:07:43 +02:00 committed by Michael Adam
parent bf22882ed3
commit 555b3d18d2

View File

@ -2731,7 +2731,7 @@ static bool keepalive_fn(const struct timeval *now, void *private_data)
{ {
struct smbd_server_connection *sconn = talloc_get_type_abort( struct smbd_server_connection *sconn = talloc_get_type_abort(
private_data, struct smbd_server_connection); private_data, struct smbd_server_connection);
struct smbXsrv_connection *xconn = sconn->conn; struct smbXsrv_connection *xconn = NULL;
bool ret; bool ret;
if (sconn->using_smb2) { if (sconn->using_smb2) {
@ -2739,6 +2739,10 @@ static bool keepalive_fn(const struct timeval *now, void *private_data)
return false; return false;
} }
/*
* With SMB1 we only have 1 connection
*/
xconn = sconn->client->connections;
smbd_lock_socket(xconn); smbd_lock_socket(xconn);
ret = send_keepalive(xconn->transport.sock); ret = send_keepalive(xconn->transport.sock);
smbd_unlock_socket(xconn); smbd_unlock_socket(xconn);