Skip to content

Commit

Permalink
Update SynWinSock.pas
Browse files Browse the repository at this point in the history
  • Loading branch information
achechulin committed Feb 1, 2019
1 parent e9af4cb commit d356da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SynWinSock.pas
Expand Up @@ -1878,7 +1878,6 @@ function TSChannelClient.Send(aSocket: THandle; aBuffer: pointer; aLength: integ
inc(PByte(aBuffer), templen);
dec(pending, templen);
trailer := Sizes.cbHeader + templen;
len := trailer + Sizes.cbTrailer;
buf[0].cbBuffer := Sizes.cbHeader;
buf[0].BufferType := SECBUFFER_STREAM_HEADER;
buf[0].pvBuffer := @temp;
Expand All @@ -1893,6 +1892,7 @@ function TSChannelClient.Send(aSocket: THandle; aBuffer: pointer; aLength: integ
buf[3].pvBuffer := nil;
if EncryptMessage(@Ctxt, 0, @desc, 0) <> SEC_E_OK then
exit; // shutdown the connection on SChannel error
len := buf[0].cbBuffer + buf[1].cbBuffer + buf[2].cbBuffer;
sent := 0;
repeat
s := SynWinSock.Send(aSocket, @temp[sent], len, MSG_NOSIGNAL);
Expand Down

0 comments on commit d356da7

Please sign in to comment.