1 Fix a bug in the IP address displayed for localhost in innd's status file.
2 It was not correctly initialized (it is a local connection which does not
5 http://inn.eyrie.org/viewcvs/branches/2.4/innd/status.c?r1=7947&r2=7946&pathrev=7947&view=patch
7 --- 2.4/innd/status.c 2008/08/03 07:50:03 7946
8 +++ 2.4/innd/status.c 2008/08/03 07:55:20 7947
10 status = xmalloc(sizeof(STATUS));
11 peers++; /* a new peer */
12 strlcpy(status->name, TempString, sizeof(status->name));
13 - strlcpy(status->ip_addr,
14 - sprint_sockaddr((struct sockaddr *)&cp->Address),
15 - sizeof(status->ip_addr));
16 + if (cp->Address.ss_family == 0) {
17 + /* Connections from lc.c do not have an IP address. */
18 + memset(&status->ip_addr, 0, sizeof(status->ip_addr));
20 + strlcpy(status->ip_addr,
21 + sprint_sockaddr((struct sockaddr *)&cp->Address),
22 + sizeof(status->ip_addr));
24 status->can_stream = cp->Streaming;
25 status->seconds = status->Size = status->DuplicateSize = 0;
26 status->Ihave = status->Ihave_Duplicate =