mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 08:35:45 -04:00
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:
parent
7e08576c52
commit
9000cf9034
1 changed files with 25 additions and 13 deletions
|
@ -403,23 +403,35 @@ int pqissllistenbase::continueSSL(IncomingSSLInfo& incoming_connexion_info, bool
|
||||||
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
|
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ssl_err == SSL_ERROR_WANT_READ) ||
|
switch (ssl_err) {
|
||||||
(ssl_err == SSL_ERROR_WANT_WRITE))
|
case SSL_ERROR_WANT_READ:
|
||||||
{
|
case SSL_ERROR_WANT_WRITE:
|
||||||
std::string out = "pqissllistenbase::continueSSL() Connection Not Complete!\n";
|
|
||||||
|
|
||||||
if (addin)
|
|
||||||
{
|
{
|
||||||
out += "pqissllistenbase::continueSSL() Adding SSL to incoming!";
|
std::string out = "pqissllistenbase::continueSSL() Connection Not Complete!\n";
|
||||||
|
|
||||||
// add to incomingqueue.
|
if (addin)
|
||||||
incoming_ssl.push_back(incoming_connexion_info) ;
|
{
|
||||||
|
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);
|
// basic-error while connecting, no security message needed
|
||||||
|
return -1;
|
||||||
// zero means still continuing....
|
}
|
||||||
return 0;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we have failed -> get certificate if possible */
|
/* we have failed -> get certificate if possible */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue