Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed concurrency problem when reading messages in ofx mpeClient

  • Loading branch information...
commit 0635f49bab6f71b9ec57604a5b841db5632158c0 1 parent a2e37c1
@araid araid authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 ofxMostPixelsEver/src/mpeClientTCP.h
View
7 ofxMostPixelsEver/src/mpeClientTCP.h
@@ -57,7 +57,12 @@ class mpeClientTCP : public ofThread {
void broadcast(string _msg);
bool messageAvailable() { return bMessageAvailable; }
- vector<string> getDataMessage() { return dataMessage; }
+ vector<string> getDataMessage() {
+ lock();
+ vector<string> returnMessage = dataMessage;
+ unlock();
+ return returnMessage;
+ }
bool intsAvailable() { return bIntsAvailable; }
vector<int> getInts() { return ints; }
bool bytesAvailable() { return bBytesAvailable; }
Please sign in to comment.
Something went wrong with that request. Please try again.