From cfdf6bd73ac71314b348fc8c74b0d7854f0c0763 Mon Sep 17 00:00:00 2001 From: crs Date: Sun, 21 Oct 2001 00:21:21 +0000 Subject: [PATCH] fixed handling of stream ownership. --- synergy/CClient.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/synergy/CClient.cpp b/synergy/CClient.cpp index 8cd8fb61..51298a2c 100644 --- a/synergy/CClient.cpp +++ b/synergy/CClient.cpp @@ -60,18 +60,20 @@ void CClient::runSession(void*) IOutputStream* srcOutput = socket->getOutputStream(); // attach the encryption layer + bool own = false; /* FIXME -- implement ISecurityFactory if (m_securityFactory != NULL) { - input.reset(m_securityFactory->createInputFilter(srcInput, false)); - output.reset(m_securityFactory->createOutputFilter(srcOutput, false)); + input.reset(m_securityFactory->createInputFilter(srcInput, own)); + output.reset(m_securityFactory->createOutputFilter(srcOutput, own)); srcInput = input.get(); srcOutput = output.get(); + own = true; } */ // attach the packetizing filters - input.reset(new CInputPacketStream(srcInput, true)); - output.reset(new COutputPacketStream(srcOutput, true)); + input.reset(new CInputPacketStream(srcInput, own)); + output.reset(new COutputPacketStream(srcOutput, own)); // wait for hello from server log((CLOG_DEBUG "wait for hello"));