Fixed port assign by SetVarSin on old Winsock API.
git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@113 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
parent
de44816b86
commit
e536e080ee
@ -1,5 +1,5 @@
|
||||
{==============================================================================|
|
||||
| Project : Ararat Synapse | 002.002.001 |
|
||||
| Project : Ararat Synapse | 002.002.002 |
|
||||
|==============================================================================|
|
||||
| Content: Socket Independent Platform Layer - Win32 definition include |
|
||||
|==============================================================================|
|
||||
@ -1179,7 +1179,7 @@ begin
|
||||
Sin.sin_family := AF_INET;
|
||||
ProtoEnt := synsock.GetProtoByNumber(SockProtocol);
|
||||
ServEnt := nil;
|
||||
if ProtoEnt <> nil then
|
||||
if (ProtoEnt <> nil) and (StrToIntDef(Port,-1) =-1) then
|
||||
ServEnt := synsock.GetServByName(PAnsiChar(Port), ProtoEnt^.p_name);
|
||||
if ServEnt = nil then
|
||||
Sin.sin_port := synsock.htons(StrToIntDef(Port, 0))
|
||||
|
Loading…
Reference in New Issue
Block a user