patch from thunder to handle connexion break correctly, and therefore avoid false notification attempt of friend.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5807 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-11-11 19:28:45 +00:00
parent 7e08576c52
commit 9000cf9034

View File

@ -403,23 +403,35 @@ int pqissllistenbase::continueSSL(IncomingSSLInfo& incoming_connexion_info, bool
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
}
if ((ssl_err == SSL_ERROR_WANT_READ) ||
(ssl_err == SSL_ERROR_WANT_WRITE))
{
std::string out = "pqissllistenbase::continueSSL() Connection Not Complete!\n";
if (addin)
switch (ssl_err) {
case SSL_ERROR_WANT_READ:
case SSL_ERROR_WANT_WRITE:
{
out += "pqissllistenbase::continueSSL() Adding SSL to incoming!";
std::string out = "pqissllistenbase::continueSSL() Connection Not Complete!\n";
// add to incomingqueue.
incoming_ssl.push_back(incoming_connexion_info) ;
if (addin)
{
out += "pqissllistenbase::continueSSL() Adding SSL to incoming!";
// add to incomingqueue.
incoming_ssl.push_back(incoming_connexion_info) ;
}
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
// zero means still continuing....
return 0;
}
break;
case SSL_ERROR_SYSCALL:
{
std::string out = "pqissllistenbase::continueSSL() Connection failed!\n";
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
// zero means still continuing....
return 0;
// basic-error while connecting, no security message needed
return -1;
}
break;
}
/* we have failed -> get certificate if possible */