From 555b3d18d224a210907682ac1561bd91f9596810 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Sep 2014 04:07:43 +0200 Subject: [PATCH] s3:smbd: use sconn->client->connections in keepalive_fn() Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- source3/smbd/process.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 3f9b18c9f19..280f86246a2 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2731,7 +2731,7 @@ static bool keepalive_fn(const struct timeval *now, void *private_data) { struct smbd_server_connection *sconn = talloc_get_type_abort( private_data, struct smbd_server_connection); - struct smbXsrv_connection *xconn = sconn->conn; + struct smbXsrv_connection *xconn = NULL; bool ret; if (sconn->using_smb2) { @@ -2739,6 +2739,10 @@ static bool keepalive_fn(const struct timeval *now, void *private_data) return false; } + /* + * With SMB1 we only have 1 connection + */ + xconn = sconn->client->connections; smbd_lock_socket(xconn); ret = send_keepalive(xconn->transport.sock); smbd_unlock_socket(xconn);