removed using ntop instead of ntoa to get rid of mutex (ref r30374:30377)

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1789 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 17 years ago
parent 3cdb00f9b4
commit 5dc1635495

@ -419,13 +419,12 @@ string filename_from_fullpath(const string& path)
return "";
}
AmMutex inet_ntoa_mut;
string get_addr_str(struct in_addr in)
{
inet_ntoa_mut.lock();
string addr = inet_ntoa(in);
inet_ntoa_mut.unlock();
return addr;
char res[46]; // INET6_ADDRSTRLEN
if (inet_ntop(AF_INET, &in, res, 46))
return string(res);
else return "";
}
AmMutex inet_gethostbyname;

Loading…
Cancel
Save