Skip to content

Commit

Permalink
sockets(windows): fix getLocalEndpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
alaviss committed Feb 14, 2024
1 parent 4664a74 commit 07092af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sys/private/sockets_windows.nim
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,13 @@ proc getLocalEndpoint(fd: SocketFD): IPEndpoint =
"The length of the endpoint structure is bigger than expected size. This is a nim-sys bug."

result =
case remoteAddr.ss_family
case saddr.ss_family
of AF_INET:
IPEndpoint(kind: V4, v4: cast[ptr IP4Endpoint](remoteAddr)[])
IPEndpoint(kind: V4, v4: cast[IP4Endpoint](saddr)[])

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on amd64 (nim version-2-0)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'

Check failure on line 543 in src/sys/private/sockets_windows.nim

View workflow job for this annotation

GitHub Actions / windows on i386 (nim devel)

expression cannot be cast to 'IP4EndpointImpl'
of AF_INET6:
IPEndpoint(kind: V6, v6: cast[ptr IP6Endpoint](remoteAddr)[])
IPEndpoint(kind: V6, v6: cast[IP6Endpoint](saddr)[])
else:
doAssert false, "Unexpected local address family: " & $remoteAddr.ss_family
doAssert false, "Unexpected local address family: " & $saddr.ss_family

proc initWinsock() =
## Initializes winsock for use with sys/sockets
Expand Down

0 comments on commit 07092af

Please sign in to comment.