summaryrefslogtreecommitdiff
path: root/src/stable/protocoltelnet.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2014-08-14 15:49:05 +0000
committerMike Buland <eichlan@xagasoft.com>2014-08-14 15:49:05 +0000
commitc5f69c22ca51510da1674bf56982f8f1e3ca4a40 (patch)
tree344332bc84359d6da4e626ede92bf31ae5d1a52b /src/stable/protocoltelnet.h
parentd55d73c7050e6452f18678e60b42a088175cb7ce (diff)
downloadlibbu++-c5f69c22ca51510da1674bf56982f8f1e3ca4a40.tar.gz
libbu++-c5f69c22ca51510da1674bf56982f8f1e3ca4a40.tar.bz2
libbu++-c5f69c22ca51510da1674bf56982f8f1e3ca4a40.tar.xz
libbu++-c5f69c22ca51510da1674bf56982f8f1e3ca4a40.zip
Neither the Bu::Client class or the Bu::ProtocolTelnet class were threadsafe
and both really need to be. Bu::Client is used in multi-threaded applications and has been for a while, so it's a no brainer. It may need a little bit more safety added around variable access, but all the buffers are safe now. ProtocolTelnet has it's own issus, and I should probably rework a few parts of it before too long so we can better accomidate things like line editing.
Diffstat (limited to '')
-rw-r--r--src/stable/protocoltelnet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stable/protocoltelnet.h b/src/stable/protocoltelnet.h
index 60faef4..19298dc 100644
--- a/src/stable/protocoltelnet.h
+++ b/src/stable/protocoltelnet.h
@@ -11,6 +11,7 @@
11#include "bu/protocol.h" 11#include "bu/protocol.h"
12#include "bu/hash.h" 12#include "bu/hash.h"
13#include "bu/string.h" 13#include "bu/string.h"
14#include "bu/mutex.h"
14 15
15// #define __TELNET_DEBUG 16// #define __TELNET_DEBUG
16 17
@@ -210,6 +211,8 @@ namespace Bu
210#endif 211#endif
211 212
212 private: 213 private:
214 Mutex mRead;
215 Mutex mWrite;
213 Client *pClient; 216 Client *pClient;
214 217
215 Bu::String sDataBuf; /**< Buffer for regular line data. */ 218 Bu::String sDataBuf; /**< Buffer for regular line data. */