Merging branches/v0.6-initdev into trunk.

These split at 6672 -> 7075, so quite a bit merge.
libretroshare compiles - but untested.
retroshare-gui needs GenCertDialog.ui and IdEditDialog.ui to be properly merged. (compile errors).
some plugins will be broken.
retroshare-nogui is untested.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7078 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2014-02-01 14:16:15 +00:00
commit c0738eec7f
407 changed files with 23716 additions and 50779 deletions

View file

@ -1,6 +1,8 @@
#include "dnsresolver.h"
#include "pqi/pqinetwork.h"
#include "util/rsnet.h"
#ifndef WIN32
#include <netdb.h>
@ -65,13 +67,19 @@ void *solveDNSEntries(void *p)
{
RsStackMutex mut(dnsr->_rdnsMtx) ;
DNSResolver::AddrInfo &info = (*dnsr->_addr_map)[next_call];
if(pHost)
{
(*dnsr->_addr_map)[next_call].state = DNSResolver::DNS_HAVE ;
(*dnsr->_addr_map)[next_call].addr.s_addr = *(unsigned long*) (pHost->h_addr);
info.state = DNSResolver::DNS_HAVE ;
// IPv4 for the moment.
struct sockaddr_in *addrv4p = (struct sockaddr_in *) &(info.addr);
addrv4p->sin_family = AF_INET;
addrv4p->sin_addr.s_addr = *(unsigned long*) (pHost->h_addr);
addrv4p->sin_port = htons(0);
}
else
(*dnsr->_addr_map)[next_call].state = DNSResolver::DNS_LOOKUP_ERROR ;
info.state = DNSResolver::DNS_LOOKUP_ERROR ;
}
}
}
@ -104,9 +112,9 @@ void DNSResolver::reset()
_addr_map->clear();
}
bool DNSResolver::getIPAddressFromString(const std::string& server_name,struct in_addr& addr)
bool DNSResolver::getIPAddressFromString(const std::string& server_name,struct sockaddr_storage &addr)
{
addr.s_addr = 0 ;
sockaddr_storage_clear(addr);
bool running = false;
{
RsStackMutex mut(_rdnsMtx) ;