Merge pull request #7 from yorhel/master

TLS probing fix
This commit is contained in:
Jan Vidar Krey 2012-06-03 15:45:28 -07:00
commit 949b54fcdd
1 changed files with 3 additions and 4 deletions

View File

@ -76,12 +76,11 @@ static void probe_net_event(struct net_connection* con, int events, void *arg)
probe_recvbuf[0] == 22 &&
probe_recvbuf[1] == 3 && /* protocol major version */
probe_recvbuf[5] == 1 && /* message type */
probe_recvbuf[9] == probe_recvbuf[1] &&
probe_recvbuf[10] == probe_recvbuf[2])
probe_recvbuf[9] == probe_recvbuf[1])
{
if (probe->hub->config->tls_enable)
{
LOG_TRACE("Probed TLS %d.%d connection", (int) probe_recvbuf[1], (int) probe_recvbuf[2]);
LOG_TRACE("Probed TLS %d.%d connection", (int) probe_recvbuf[9], (int) probe_recvbuf[10]);
if (user_create(probe->hub, probe->connection, &probe->addr))
{
probe->connection = 0;
@ -90,7 +89,7 @@ static void probe_net_event(struct net_connection* con, int events, void *arg)
}
else
{
LOG_TRACE("Probed TLS %d.%d connection. TLS disabled in hub.", (int) probe_recvbuf[1], (int) probe_recvbuf[2]);
LOG_TRACE("Probed TLS %d.%d connection. TLS disabled in hub.", (int) probe_recvbuf[9], (int) probe_recvbuf[10]);
}
}
else