Author: metze Date: 2005-12-07 07:28:43 +0000 (Wed, 07 Dec 2005) New Revision: 12114
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12114 Log: - smb2_keepalive() acts on the smb2_transport - smb2_logoff() acts on the smb2_session metze Modified: branches/SAMBA_4_0/source/libcli/smb2/keepalive.c branches/SAMBA_4_0/source/libcli/smb2/logoff.c branches/SAMBA_4_0/source/torture/smb2/connect.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/smb2/keepalive.c =================================================================== --- branches/SAMBA_4_0/source/libcli/smb2/keepalive.c 2005-12-07 07:14:13 UTC (rev 12113) +++ branches/SAMBA_4_0/source/libcli/smb2/keepalive.c 2005-12-07 07:28:43 UTC (rev 12114) @@ -28,11 +28,11 @@ /* send a keepalive request */ -struct smb2_request *smb2_keepalive_send(struct smb2_tree *tree) +struct smb2_request *smb2_keepalive_send(struct smb2_transport *transport) { struct smb2_request *req; - req = smb2_request_init_tree(tree, SMB2_OP_KEEPALIVE, 0x04, 0); + req = smb2_request_init(transport, SMB2_OP_KEEPALIVE, 0x04, 0); if (req == NULL) return NULL; SSVAL(req->out.body, 0x02, 0); @@ -60,8 +60,8 @@ /* sync keepalive request */ -NTSTATUS smb2_keepalive(struct smb2_tree *tree) +NTSTATUS smb2_keepalive(struct smb2_transport *transport) { - struct smb2_request *req = smb2_keepalive_send(tree); + struct smb2_request *req = smb2_keepalive_send(transport); return smb2_keepalive_recv(req); } Modified: branches/SAMBA_4_0/source/libcli/smb2/logoff.c =================================================================== --- branches/SAMBA_4_0/source/libcli/smb2/logoff.c 2005-12-07 07:14:13 UTC (rev 12113) +++ branches/SAMBA_4_0/source/libcli/smb2/logoff.c 2005-12-07 07:28:43 UTC (rev 12114) @@ -28,13 +28,15 @@ /* send a logoff request */ -struct smb2_request *smb2_logoff_send(struct smb2_tree *tree) +struct smb2_request *smb2_logoff_send(struct smb2_session *session) { struct smb2_request *req; - req = smb2_request_init_tree(tree, SMB2_OP_LOGOFF, 0x04, 0); + req = smb2_request_init(session->transport, SMB2_OP_LOGOFF, 0x04, 0); if (req == NULL) return NULL; + SBVAL(req->out.hdr, SMB2_HDR_UID, session->uid); + SSVAL(req->out.body, 0x02, 0); smb2_transport_send(req); @@ -60,8 +62,8 @@ /* sync logoff request */ -NTSTATUS smb2_logoff(struct smb2_tree *tree) +NTSTATUS smb2_logoff(struct smb2_session *session) { - struct smb2_request *req = smb2_logoff_send(tree); + struct smb2_request *req = smb2_logoff_send(session); return smb2_logoff_recv(req); } Modified: branches/SAMBA_4_0/source/torture/smb2/connect.c =================================================================== --- branches/SAMBA_4_0/source/torture/smb2/connect.c 2005-12-07 07:14:13 UTC (rev 12113) +++ branches/SAMBA_4_0/source/torture/smb2/connect.c 2005-12-07 07:28:43 UTC (rev 12114) @@ -216,19 +216,19 @@ return False; } - status = smb2_logoff(tree); + status = smb2_logoff(tree->session); if (!NT_STATUS_IS_OK(status)) { printf("Logoff failed - %s\n", nt_errstr(status)); return False; } - status = smb2_logoff(tree); + status = smb2_logoff(tree->session); if (!NT_STATUS_EQUAL(status, NT_STATUS_USER_SESSION_DELETED)) { printf("Logoff should have disabled session - %s\n", nt_errstr(status)); return False; } - status = smb2_keepalive(tree); + status = smb2_keepalive(tree->session->transport); if (!NT_STATUS_IS_OK(status)) { printf("keepalive failed? - %s\n", nt_errstr(status)); return False;
