aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-09-20 19:30:12 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-09-20 19:30:12 +0000
commitcf8263fd0603d064cf56ad7ecd4413d9fbfffce2 (patch)
tree66a070d542176dd33abd922b80bd39e22b03f4a4
parent2575736b5137bc4ebcd97a3cade08e68df367e79 (diff)
downloadmailfromd-cf8263fd0603d064cf56ad7ecd4413d9fbfffce2.tar.gz
mailfromd-cf8263fd0603d064cf56ad7ecd4413d9fbfffce2.tar.bz2
(resolve_ipstr): Lock critical section
git-svn-id: file:///svnroot/mailfromd/trunk@179 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r--src/dns.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dns.c b/src/dns.c
index b95af858..e77547d3 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -405,7 +405,9 @@ resolve_ipstr(char *ipstr, char *hbuf, size_t hbsize)
if (!answer)
answer = malloc(MAXPACKET);
debug1(100,"Getting canonical name for %s", ipstr);
+ pthread_mutex_lock(&mf_mutex);
status = _resolve_ipstr(ipstr, answer, MAXPACKET, hbuf, hbsize);
+ pthread_mutex_unlock(&mf_mutex);
if (status == mf_success)
debug2(100, "%s resolved to %s", ipstr, hbuf);
else

Return to:

Send suggestions and report system problems to the System administrator.