mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-26 03:35:30 +03:00
fixed handling of stream ownership.
This commit is contained in:
parent
8d1cf844c7
commit
cfdf6bd73a
@ -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"));
|
||||||
|
Loading…
Reference in New Issue
Block a user