Tweak the emulated modem

This commit is contained in:
CrazyEttin 2022-10-02 19:09:32 +03:00
parent d324e795ed
commit 85495426b2
1 changed files with 6 additions and 25 deletions

View File

@ -321,19 +321,10 @@ begin
CallServer; CallServer;
//Recieve //Recieve
if Calling then begin if Calling then begin
if fpRecv (ServerSocket, @B, 1, 0) <> 1 then begin if fpRecv (ServerSocket, @B, 1, 0) <> 1 then B := 0;
B := 0;
CloseSocket (ServerSocket);
Calling := false;
end;
end end
else if Answering then begin else if Answering then begin
if fpRecv (ClientSocket, @B, 1, 0) <> 1 then begin if fpRecv (ClientSocket, @B, 1, 0) <> 1 then B := 0;
B := 0;
CloseSocket (ClientSocket);
CloseSocket (ListenSocket);
Answering := false;
end;
end end
else B := 0; else B := 0;
end end
@ -372,7 +363,8 @@ begin
fpfd_zero (FileDescs); fpfd_zero (FileDescs);
fpfd_set (ClientSocket, FileDescs); fpfd_set (ClientSocket, FileDescs);
if fpSelect (ClientSocket + 1, @FileDescs, nil, nil, 0) > 0 then B := B or $20; if fpSelect (ClientSocket + 1, @FileDescs, nil, nil, 0) > 0 then B := B or $20;
end; end
else B := B or $20;
{$endif} {$endif}
{$ifndef modem} {$ifndef modem}
B := B or $20; B := B or $20;
@ -729,19 +721,8 @@ begin
//Connect //Connect
CallServer; CallServer;
//Send //Send
if Calling then begin if Calling then fpSend (ServerSocket, @B, 1, 0)
if fpSend (ServerSocket, @B, 1, 0) <> 1 then begin else if Answering then fpSend (ClientSocket, @B, 1, 0);
CloseSocket (ServerSocket);
Calling := false;
end;
end
else if Answering then begin
if fpSend (ClientSocket, @B, 1, 0) <> 1 then begin
CloseSocket (ClientSocket);
CloseSocket (ListenSocket);
Answering := false;
end;
end;
end end
{$endif} {$endif}
//Regular store //Regular store