streamts.cpp StreamInstance::Send: do not block neutrino by faulty stream

Origin commit data
------------------
Branch: ni/coolstream
Commit: c170b03b9a
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2014-04-07 (Mon, 07 Apr 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2014-04-07 16:01:27 +02:00
parent 2759a43ed2
commit 60a200bc0f

View File

@@ -113,11 +113,15 @@ bool CStreamInstance::Stop()
bool CStreamInstance::Send(ssize_t r)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
//OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
stream_fds_t cfds;
mutex.lock();
cfds = fds;
mutex.unlock();
int flags = 0;
if (fds.size() > 1)
if (cfds.size() > 1)
flags = MSG_DONTWAIT;
for (stream_fds_t::iterator it = fds.begin(); it != fds.end(); ++it) {
for (stream_fds_t::iterator it = cfds.begin(); it != cfds.end(); ++it) {
int i = 10;
unsigned char *b = buf;
ssize_t count = r;