[Lldb-commits] [lldb] r138151 - /lldb/tags/lldb-74/source/Core/Communication.cpp
Greg Clayton
gclayton at apple.com
Fri Aug 19 16:45:49 PDT 2011
Author: gclayton
Date: Fri Aug 19 18:45:49 2011
New Revision: 138151
URL: http://llvm.org/viewvc/llvm-project?rev=138151&view=rev
Log:
Porting revision 138146 over to the lldb-74 tag.
Modified:
lldb/tags/lldb-74/source/Core/Communication.cpp
Modified: lldb/tags/lldb-74/source/Core/Communication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/tags/lldb-74/source/Core/Communication.cpp?rev=138151&r1=138150&r2=138151&view=diff
==============================================================================
--- lldb/tags/lldb-74/source/Core/Communication.cpp (original)
+++ lldb/tags/lldb-74/source/Core/Communication.cpp Fri Aug 19 18:45:49 2011
@@ -64,6 +64,7 @@
void
Communication::Clear()
{
+ SetReadThreadBytesReceivedCallback (NULL, NULL);
StopReadThread (NULL);
Disconnect (NULL);
}
@@ -295,7 +296,7 @@
// If the user registered a callback, then call it and do not broadcast
m_callback (m_callback_baton, bytes, len);
}
- else
+ else if (bytes != NULL && len > 0)
{
Mutex::Locker locker(m_bytes_mutex);
m_bytes.append ((const char *)bytes, len);
More information about the lldb-commits
mailing list