make sockstat not print wierd addresses on not connected unix domain sockets

Pointed out by:	rwatson
Reviewed by:	peter
This commit is contained in:
jmg 2003-07-19 06:23:56 +00:00
parent 92d5461b30
commit 3210986215

View File

@ -540,8 +540,12 @@ display(void)
break;
}
/* client */
pos += xprintf("-> ");
p = *(void **)&s->faddr;
if (p == NULL) {
pos += xprintf("(not connected)");
break;
}
pos += xprintf("-> ");
for (hash = 0; hash < HASHSIZE; ++hash) {
for (s = sockhash[hash]; s != NULL; s = s->next)
if (s->pcb == p)