Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,11 +1060,11 @@ int sockread(char *s, int *len, sock_list *slist, int slistmax, int tclonly)
#ifdef EGG_TDNS
dtn_prev = dns_thread_head;
for (dtn = dtn_prev->next; dtn; dtn = dtn->next) {
pthread_mutex_lock(&dtn->mutex);
if (*dtn->strerror)
debug2("%s: hostname %s", dtn->strerror, dtn->host);
fd = dtn->fildes[0];
if (FD_ISSET(fd, &fdr)) {
pthread_mutex_lock(&dtn->mutex);
if (*dtn->strerror)
debug2("%s: hostname %s", dtn->strerror, dtn->host);
if (dtn->type == DTN_TYPE_HOSTBYIP)
call_hostbyip(&dtn->addr, dtn->host, !*dtn->strerror);
else
Expand All @@ -1076,8 +1076,7 @@ int sockread(char *s, int *len, sock_list *slist, int slistmax, int tclonly)
dtn_prev->next = dtn->next;
nfree(dtn);
dtn = dtn_prev;
} else
pthread_mutex_unlock(&dtn->mutex);
}
dtn_prev = dtn;
}
#endif
Expand Down
Loading