Added thread safe function for inet_ntoa in libbitdht.

Used the existing thread safe function for inet_ntoa in libretroshare.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5033 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-03-18 01:33:25 +00:00
parent 117d10eb44
commit 0b1126babf
10 changed files with 24 additions and 9 deletions

View file

@ -227,7 +227,7 @@ void bdStore::writeStore(std::string file)
std::list<bdPeer>::iterator it;
for(it = store.begin(); it != store.end(); it++)
{
fprintf(fd, "%s %d\n", inet_ntoa(it->mPeerId.addr.sin_addr), ntohs(it->mPeerId.addr.sin_port));
fprintf(fd, "%s %d\n", bdnet_inet_ntoa(it->mPeerId.addr.sin_addr).c_str(), ntohs(it->mPeerId.addr.sin_port));
#ifdef DEBUG_STORE
fprintf(stderr, "Storing Peer Address: %s %d\n", inet_ntoa(it->mPeerId.addr.sin_addr), ntohs(it->mPeerId.addr.sin_port));
#endif