more ipv6 specifics.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3081 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-12-03 01:25:03 +00:00
parent 90770c1347
commit a4f5def446

View file

@ -443,7 +443,7 @@ char *NET_AdrToString (char *s, int len, netadr_t a)
#ifdef IRCCONNECT #ifdef IRCCONNECT
case NA_IRC: case NA_IRC:
if (*a.address.irc.channel) if (*a.address.irc.channel)
snprintf (s, len, "irc://%s@", a.address.irc.user, a.address.irc.channel); snprintf (s, len, "irc://%s@%s", a.address.irc.user, a.address.irc.channel);
else else
snprintf (s, len, "irc://%s", a.address.irc.user); snprintf (s, len, "irc://%s", a.address.irc.user);
break; break;
@ -2043,10 +2043,12 @@ ftenet_generic_connection_t *FTENET_TCPConnect_EstablishConnection(int affamily,
} }
} }
#ifdef IPPROTO_IPV6
ftenet_generic_connection_t *FTENET_TCP6Connect_EstablishConnection(qboolean isserver, char *address) ftenet_generic_connection_t *FTENET_TCP6Connect_EstablishConnection(qboolean isserver, char *address)
{ {
return FTENET_TCPConnect_EstablishConnection(AF_INET6, isserver, address); return FTENET_TCPConnect_EstablishConnection(AF_INET6, isserver, address);
} }
#endif
ftenet_generic_connection_t *FTENET_TCP4Connect_EstablishConnection(qboolean isserver, char *address) ftenet_generic_connection_t *FTENET_TCP4Connect_EstablishConnection(qboolean isserver, char *address)
{ {
@ -2742,10 +2744,12 @@ void NET_EnsureRoute(ftenet_connections_t *collection, char *routename, char *ho
case NA_TCP: case NA_TCP:
FTENET_AddToCollection(collection, routename, host, FTENET_TCP4Connect_EstablishConnection); FTENET_AddToCollection(collection, routename, host, FTENET_TCP4Connect_EstablishConnection);
break; break;
#ifdef IPPROTO_IPV6
case NA_TCPV6: case NA_TCPV6:
FTENET_AddToCollection(collection, routename, host, FTENET_TCP6Connect_EstablishConnection); FTENET_AddToCollection(collection, routename, host, FTENET_TCP6Connect_EstablishConnection);
break; break;
#endif #endif
#endif
#ifdef IRCCONNECT #ifdef IRCCONNECT
case NA_IRC: case NA_IRC:
FTENET_AddToCollection(collection, routename, host, FTENET_IRCConnect_EstablishConnection); FTENET_AddToCollection(collection, routename, host, FTENET_IRCConnect_EstablishConnection);
@ -3186,9 +3190,11 @@ void SVNET_AddPort(void)
case NA_TCP: case NA_TCP:
FTENET_AddToCollection(svs.sockets, NULL, s, FTENET_TCP4Connect_EstablishConnection); FTENET_AddToCollection(svs.sockets, NULL, s, FTENET_TCP4Connect_EstablishConnection);
break; break;
#ifdef IPPROTO_IPV6
case NA_TCPV6: case NA_TCPV6:
FTENET_AddToCollection(svs.sockets, NULL, s, FTENET_TCP6Connect_EstablishConnection); FTENET_AddToCollection(svs.sockets, NULL, s, FTENET_TCP6Connect_EstablishConnection);
break; break;
#endif
#endif #endif
} }
} }
@ -3256,8 +3262,6 @@ void NET_InitClient(void)
#ifndef CLIENTONLY #ifndef CLIENTONLY
FTENET_AddToCollection(cls.sockets, "CLLoopback", port, FTENET_Loop_EstablishConnection); FTENET_AddToCollection(cls.sockets, "CLLoopback", port, FTENET_Loop_EstablishConnection);
#endif #endif
// FTENET_AddToCollection(cls.sockets, "CLTCP6", port, FTENET_TCP6Connect_EstablishConnection);
// FTENET_AddToCollection(cls.sockets, "CLTCP4", port, FTENET_TCP4Connect_EstablishConnection);
FTENET_AddToCollection(cls.sockets, "CLUDP4", port, FTENET_UDP4_EstablishConnection); FTENET_AddToCollection(cls.sockets, "CLUDP4", port, FTENET_UDP4_EstablishConnection);
#ifdef IPPROTO_IPV6 #ifdef IPPROTO_IPV6
FTENET_AddToCollection(cls.sockets, "CLUDP6", port, FTENET_UDP6_EstablishConnection); FTENET_AddToCollection(cls.sockets, "CLUDP6", port, FTENET_UDP6_EstablishConnection);