mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
* Fixed up UDP Port "netReset()" (was stuck on 7812, now follows your tcp port).
* OSX Bug: doesn't like classes in C files. switched to void * pointer. * A little extra debugging in pqissl on disconnects. * switched on bitdht by default in libretroshare.pro git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3334 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7318fdf9c8
commit
627b0f88a2
@ -1,7 +1,7 @@
|
||||
TEMPLATE = lib
|
||||
#CONFIG += staticlib release
|
||||
CONFIG += staticlib testnetwork
|
||||
#CONFIG += staticlib testnetwork bitdht
|
||||
#CONFIG += staticlib testnetwork
|
||||
CONFIG += staticlib testnetwork bitdht
|
||||
CONFIG -= qt
|
||||
TARGET = retroshare
|
||||
|
||||
@ -36,7 +36,6 @@ testnetwork {
|
||||
}
|
||||
|
||||
|
||||
|
||||
#CONFIG += debug
|
||||
debug {
|
||||
# DEFINES *= DEBUG
|
||||
|
@ -1364,6 +1364,26 @@ int pqissl::senddata(void *data, int len)
|
||||
out << std::endl;
|
||||
std::cerr << out.str() ;
|
||||
rslog(RSL_ALERT, pqisslzone, out.str());
|
||||
|
||||
/* extra debugging - based on SSL_get_error() man page */
|
||||
{
|
||||
int errsys = errno;
|
||||
int sslerr = 0;
|
||||
std::ostringstream out2;
|
||||
out2 << "SSL_ERROR_SYSCALL, ret == " << tmppktlen;
|
||||
out2 << " errno: " << errsys << std::endl;
|
||||
|
||||
while(0 != (sslerr = ERR_get_error()))
|
||||
{
|
||||
out2 << "SSLERR:" << sslerr << " : ";
|
||||
|
||||
char sslbuf[256] = {0};
|
||||
out2 << ERR_error_string(sslerr, sslbuf);
|
||||
out2 << std::endl;
|
||||
}
|
||||
rslog(RSL_ALERT, pqisslzone, out2.str());
|
||||
}
|
||||
|
||||
reset();
|
||||
return -1;
|
||||
}
|
||||
@ -1488,6 +1508,26 @@ int pqissl::readdata(void *data, int len)
|
||||
out << "Socket Closed Abruptly.... Resetting PQIssl";
|
||||
out << std::endl;
|
||||
rslog(RSL_ALERT, pqisslzone, out.str());
|
||||
|
||||
/* extra debugging - based on SSL_get_error() man page */
|
||||
{
|
||||
int syserr = errno;
|
||||
int sslerr = 0;
|
||||
std::ostringstream out2;
|
||||
out2 << "SSL_ERROR_SYSCALL, ret == " << tmppktlen;
|
||||
out2 << " errno: " << syserr << std::endl;
|
||||
|
||||
while(0 != (sslerr = ERR_get_error()))
|
||||
{
|
||||
out2 << "SSLERR:" << sslerr << " : ";
|
||||
|
||||
char sslbuf[256] = {0};
|
||||
out2 << ERR_error_string(sslerr, sslbuf);
|
||||
out2 << std::endl;
|
||||
}
|
||||
rslog(RSL_ALERT, pqisslzone, out2.str());
|
||||
}
|
||||
|
||||
reset();
|
||||
std::cerr << out.str() << std::endl ;
|
||||
return -1;
|
||||
|
@ -2264,6 +2264,7 @@ int RsServer::StartupRetroShare()
|
||||
|
||||
#ifdef RS_USE_BITDHT
|
||||
mConnMgr->addNetAssistConnect(1, mBitDht);
|
||||
mConnMgr->addNetListener(mUdpStack);
|
||||
#endif
|
||||
mConnMgr->addNetAssistFirewall(1, mUpnpMgr);
|
||||
|
||||
@ -2372,7 +2373,6 @@ int RsServer::StartupRetroShare()
|
||||
|
||||
pqih->init_listener();
|
||||
mConnMgr->addNetListener(pqih); /* add listener so we can reset all sockets later */
|
||||
mConnMgr->addNetListener(mUdpStack);
|
||||
|
||||
|
||||
|
||||
|
@ -66,8 +66,9 @@ static UdpPeerReceiver *udps = NULL;
|
||||
static int tou_tick_all();
|
||||
|
||||
/* tou_init - opens the udp port (universal bind) */
|
||||
int tou_init(UdpStack *stack)
|
||||
int tou_init(void *in_udpstack)
|
||||
{
|
||||
UdpStack *stack = (UdpStack *) in_udpstack;
|
||||
if (tou_inited)
|
||||
{
|
||||
return 1;
|
||||
|
@ -58,8 +58,9 @@
|
||||
* (1) need UdpStack item, which has our address already.
|
||||
*/
|
||||
|
||||
class UdpStack;
|
||||
int tou_init(UdpStack *stack);
|
||||
// hack to avoid classes in C code. (MacOSX complaining)
|
||||
// will pass as UdpStack * as void *
|
||||
int tou_init(void *udpStack);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user