ssfpc.inc fix bug #50 - regression by commit 218 - incoorect Port byte order

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@223 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby
2021-06-15 14:34:43 +00:00
parent 039fa1c3b5
commit 77ee03bf28

View File

@@ -1,5 +1,5 @@
{==============================================================================| {==============================================================================|
| Project : Ararat Synapse | 001.001.006 | | Project : Ararat Synapse | 001.001.007 |
|==============================================================================| |==============================================================================|
| Content: Socket Independent Platform Layer - FreePascal definition include | | Content: Socket Independent Platform Layer - FreePascal definition include |
|==============================================================================| |==============================================================================|
@@ -755,7 +755,7 @@ var
begin begin
Result := 0; Result := 0;
FillChar(Sin, Sizeof(Sin), 0); FillChar(Sin, Sizeof(Sin), 0);
Sin.sin_port := Resolveport(port, family, SockProtocol, SockType); Sin.sin_port := synsock.htons(Resolveport(port, family, SockProtocol, SockType));
TwoPass := False; TwoPass := False;
if Family = AF_UNSPEC then if Family = AF_UNSPEC then
begin begin
@@ -865,7 +865,7 @@ begin
GetProtocolByNumber(SockProtocol, ProtoEnt); GetProtocolByNumber(SockProtocol, ProtoEnt);
ServEnt.port := 0; ServEnt.port := 0;
GetServiceByName(Port, ProtoEnt.Name, ServEnt); GetServiceByName(Port, ProtoEnt.Name, ServEnt);
Result := ServEnt.port; Result := synsock.ntohs(ServEnt.port);
end; end;
end; end;