Skip to content

Commit 134210a

Browse files
committed
Network fix
1 parent fb4348f commit 134210a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

code/qcommon/net_ip.c

+8-6
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,12 @@ qboolean NET_CompareAdr (netadr_t a, netadr_t b)
577577
{
578578
if(!NET_CompareBaseAdr(a, b))
579579
return qfalse;
580-
581-
if (a.type == NA_IP
582-
#ifndef __amigaos4__
583-
|| a.type == NA_IP6
580+
581+
#ifdef __amigaos4__
582+
if (a.type == NA_IP)
583+
#else
584+
if (a.type == NA_IP || a.type == NA_IP6)
584585
#endif
585-
)
586586
{
587587
if (a.port == b.port)
588588
return qtrue;
@@ -760,9 +760,11 @@ void Sys_SendPacket( int length, const void *data, netadr_t to ) {
760760
ret = sendto( ip_socket, socksBuf, length+10, 0, &socksRelayAddr, sizeof(socksRelayAddr) );
761761
}
762762
else {
763+
#ifdef __amigaos4__
764+
ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in) );
765+
#else
763766
if(addr.ss_family == AF_INET)
764767
ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in) );
765-
#ifndef __amigaos4__
766768
else if(addr.ss_family == AF_INET6)
767769
ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in6) );
768770
#endif

0 commit comments

Comments
 (0)