some debug code

This commit is contained in:
overflowerror 2019-03-13 18:18:00 +01:00
parent fd3e96c884
commit 0bfae41a10
2 changed files with 10 additions and 0 deletions

View file

@ -512,6 +512,10 @@ void dataHandler(int signo) {
}
} else if (tmp == 0) {
error("networking: connection ended");
buffer[length] = '\0';
debug("networking: buffer: '%d'", buffer);
dropConnection = true;
}
if (length > 0) {

View file

@ -51,6 +51,9 @@ void* copyFromSslToFd(void* data) {
write(connection->_readfd, &b, 1);
}
debug("ssl: read thread finished");
debug("ssl: closing read pipe");
close(connection->_readfd);
return NULL;
@ -64,6 +67,8 @@ void* copyFromFdToSsl(void* data) {
SSL_write(connection->instance, &b, 1);
}
debug("ssl: write thread finished");
return NULL;
}
@ -135,6 +140,7 @@ struct ssl_connection* ssl_initConnection(struct ssl_settings* settings, int soc
void ssl_closeConnection(struct ssl_connection* connection) {
info("ssl: closing connection");
close(connection->writefd);
close(connection->readfd);
close(connection->_writefd);