mirror of https://github.com/aria2/aria2
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.ccpull/1/head
parent
ce5c17f1b3
commit
ddb00a9445
|
@ -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>
|
2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Added summary log for peer announce storage.
|
Added summary log for peer announce storage.
|
||||||
|
|
|
@ -82,7 +82,7 @@ void SocketCore::init()
|
||||||
sslSession = NULL;
|
sslSession = NULL;
|
||||||
sslXcred = NULL;
|
sslXcred = NULL;
|
||||||
peekBufMax = 4096;
|
peekBufMax = 4096;
|
||||||
peekBuf = new char[peekBufMax];
|
peekBuf = 0;
|
||||||
peekBufLength = 0;
|
peekBufLength = 0;
|
||||||
#endif //HAVE_LIBGNUTLS
|
#endif //HAVE_LIBGNUTLS
|
||||||
}
|
}
|
||||||
|
@ -581,6 +581,7 @@ void SocketCore::initiateSecureConnection()
|
||||||
if(ret < 0) {
|
if(ret < 0) {
|
||||||
throw new DlAbortEx(EX_SSL_INIT_FAILURE, gnutls_strerror(ret));
|
throw new DlAbortEx(EX_SSL_INIT_FAILURE, gnutls_strerror(ret));
|
||||||
}
|
}
|
||||||
|
peekBuf = new char[peekBufMax];
|
||||||
}
|
}
|
||||||
#endif // HAVE_LIBGNUTLS
|
#endif // HAVE_LIBGNUTLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue