https://bugs.kde.org/show_bug.cgi?id=390387

--- Comment #2 from Gerald Butler <gerald.edward.but...@gmail.com> ---
Seems like this:


0129 char *get_host_name(int addr)
0130 {
0131     static char buffer[1024];
0132     struct hostent *host;
0133     struct in_addr a_addr;
0134 
0135     if (addr == 0) {
0136         return (char *)"*";
0137     }
0138 
0139     memset(buffer, 0, sizeof(buffer));
0140 
0141     if ((host = gethostbyaddr((char *)&addr, 4, AF_INET)) == NULL) {
0142         a_addr.s_addr = addr;
0143         return inet_ntoa(a_addr);
0144     } else {
0145         strncpy(buffer, host->h_name, sizeof(buffer)-1);
0146         buffer[sizeof(buffer) -1] = 0;
0147         return (char *)buffer;
0148     }
0149 }

Should be changed to have a timeout on "gethostbyaddr" of some small number of
milliseconds (maybe like 10 ms)? Of course, that would involve an
interruptable/time-outable get_host_by_addr wrapper of some sort. Ideally, this
would simply put the physical address in the column and do the lookups async
and populate the model with the host-names in the background if it was still
wanted.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to