pqinetwork.cc: removed compiler warnings on windows, errors was fixed already

sslfns.h: test for existing function with #ifdef doesn't work, used OPENSSL_VERSION_NUMBER instead - please test

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3284 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-07-11 00:07:19 +00:00
parent 9efe0b2e9e
commit c005f7d4a8
2 changed files with 15 additions and 3 deletions

View File

@ -529,7 +529,11 @@ bool getPreferredInterface(struct in_addr &prefAddr) // returns best addr.
{
std::list<struct in_addr> addrs;
std::list<struct in_addr>::iterator it;
struct in_addr addr_zero = {0}, addr_loop = {0}, addr_priv = {0}, addr_ext = {0}, addr = {0};
struct in_addr addr_zero, addr_loop, addr_priv, addr_ext;
#ifdef NET_DEBUG
struct in_addr addr;
#endif
bool found_zero = false;
bool found_loopback = false;
@ -541,6 +545,15 @@ bool getPreferredInterface(struct in_addr &prefAddr) // returns best addr.
return false;
}
memset(&addr_zero, 0, sizeof(addr_zero));
memset(&addr_loop, 0, sizeof(addr_loop));
memset(&addr_priv, 0, sizeof(addr_priv));
memset(&addr_ext, 0, sizeof(addr_ext));
#ifdef NET_DEBUG
memset(&addr, 0, sizeof(addr));
#endif
// find the first of each of these.
// if ext - take first.
// if no ext -> first priv
@ -918,4 +931,3 @@ int WinToUnixError(int error)
#endif
/******************* WINDOWS SPECIFIC PART ******************/

View File

@ -51,7 +51,7 @@
// IF we are compiling against ssl0.9.7 - these functions don't exist.
#if !defined(EVP_CIPHER_CTX_rand_key)
#if (OPENSSL_VERSION_NUMBER & 0xfffff000) < 0x00908000
#define SSLFNS_ADD_CIPHER_CTX_RAND_KEY 1
#endif