mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 07:02:12 +00:00
Show at least one address for each socket we're listening on, even if its loopback, instead of nothing at all.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6334 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
bc842ee28b
commit
d4d84aec9d
1 changed files with 13 additions and 1 deletions
|
@ -8383,8 +8383,9 @@ void NET_PrintAddresses(ftenet_connections_t *collection)
|
||||||
int i;
|
int i;
|
||||||
char adrbuf[MAX_ADR_SIZE];
|
char adrbuf[MAX_ADR_SIZE];
|
||||||
int m;
|
int m;
|
||||||
|
qboolean shown = false;
|
||||||
netadr_t addr[64];
|
netadr_t addr[64];
|
||||||
struct ftenet_generic_connection_s *con[sizeof(addr)/sizeof(addr[0])];
|
struct ftenet_generic_connection_s *con[sizeof(addr)/sizeof(addr[0])], *nc;
|
||||||
int flags[sizeof(addr)/sizeof(addr[0])];
|
int flags[sizeof(addr)/sizeof(addr[0])];
|
||||||
const char *params[sizeof(addr)/sizeof(addr[0])];
|
const char *params[sizeof(addr)/sizeof(addr[0])];
|
||||||
qboolean warn = true;
|
qboolean warn = true;
|
||||||
|
@ -8401,8 +8402,19 @@ void NET_PrintAddresses(ftenet_connections_t *collection)
|
||||||
if (addr[i].type != NA_INVALID)
|
if (addr[i].type != NA_INVALID)
|
||||||
{
|
{
|
||||||
enum addressscope_e scope = NET_ClassifyAddress(&addr[i], &desc);
|
enum addressscope_e scope = NET_ClassifyAddress(&addr[i], &desc);
|
||||||
|
if (i+1 < m)
|
||||||
|
nc = con[i+1];
|
||||||
|
else
|
||||||
|
nc = NULL;
|
||||||
|
if (nc != con[i])
|
||||||
|
{ //next is a different family.
|
||||||
|
if (!shown && (scope == ASCOPE_LINK || scope == ASCOPE_HOST))
|
||||||
|
scope = ASCOPE_LAN; //force it visible.
|
||||||
|
shown = false;
|
||||||
|
}
|
||||||
if (developer.ival || scope >= ASCOPE_LAN)
|
if (developer.ival || scope >= ASCOPE_LAN)
|
||||||
{
|
{
|
||||||
|
shown = true;
|
||||||
warn = false;
|
warn = false;
|
||||||
if ((addr[i].prot == NP_RTC_TCP || addr[i].prot == NP_RTC_TLS) && params[i])
|
if ((addr[i].prot == NP_RTC_TCP || addr[i].prot == NP_RTC_TLS) && params[i])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue