diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-09-20 19:30:12 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-09-20 19:30:12 +0000 |
commit | cf8263fd0603d064cf56ad7ecd4413d9fbfffce2 (patch) | |
tree | 66a070d542176dd33abd922b80bd39e22b03f4a4 | |
parent | 2575736b5137bc4ebcd97a3cade08e68df367e79 (diff) | |
download | mailfromd-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |