fixed handling of stream ownership.

This commit is contained in:
crs 2001-10-21 00:21:21 +00:00
parent 8d1cf844c7
commit cfdf6bd73a

View File

@ -60,18 +60,20 @@ void CClient::runSession(void*)
IOutputStream* srcOutput = socket->getOutputStream(); IOutputStream* srcOutput = socket->getOutputStream();
// attach the encryption layer // attach the encryption layer
bool own = false;
/* FIXME -- implement ISecurityFactory /* FIXME -- implement ISecurityFactory
if (m_securityFactory != NULL) { if (m_securityFactory != NULL) {
input.reset(m_securityFactory->createInputFilter(srcInput, false)); input.reset(m_securityFactory->createInputFilter(srcInput, own));
output.reset(m_securityFactory->createOutputFilter(srcOutput, false)); output.reset(m_securityFactory->createOutputFilter(srcOutput, own));
srcInput = input.get(); srcInput = input.get();
srcOutput = output.get(); srcOutput = output.get();
own = true;
} }
*/ */
// attach the packetizing filters // attach the packetizing filters
input.reset(new CInputPacketStream(srcInput, true)); input.reset(new CInputPacketStream(srcInput, own));
output.reset(new COutputPacketStream(srcOutput, true)); output.reset(new COutputPacketStream(srcOutput, own));
// wait for hello from server // wait for hello from server
log((CLOG_DEBUG "wait for hello")); log((CLOG_DEBUG "wait for hello"));