2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Allocate memory for peekBuf in initiateSecureConnection() to 
avoid
	the unused 4KB memory when ssl is not used.
	* src/SocketCore.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2008-03-11 12:33:20 +00:00
parent ce5c17f1b3
commit ddb00a9445
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Allocate memory for peekBuf in initiateSecureConnection() to avoid
the unused 4KB memory when ssl is not used.
* src/SocketCore.cc
2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added summary log for peer announce storage.

View File

@ -82,7 +82,7 @@ void SocketCore::init()
sslSession = NULL;
sslXcred = NULL;
peekBufMax = 4096;
peekBuf = new char[peekBufMax];
peekBuf = 0;
peekBufLength = 0;
#endif //HAVE_LIBGNUTLS
}
@ -581,6 +581,7 @@ void SocketCore::initiateSecureConnection()
if(ret < 0) {
throw new DlAbortEx(EX_SSL_INIT_FAILURE, gnutls_strerror(ret));
}
peekBuf = new char[peekBufMax];
}
#endif // HAVE_LIBGNUTLS