| 1088 | |
| 1089 | |
| 1090 | RemotePluginBase::message RemotePluginBase::receiveMessage() |
| 1091 | { |
| 1092 | #ifdef SYNC_WITH_SHM_FIFO |
| 1093 | m_in->waitForMessage(); |
| 1094 | m_in->lock(); |
| 1095 | message m; |
| 1096 | m.id = m_in->readInt(); |
| 1097 | const int s = m_in->readInt(); |
| 1098 | for( int i = 0; i < s; ++i ) |
| 1099 | { |
| 1100 | m.data.push_back( m_in->readString() ); |
| 1101 | } |
| 1102 | m_in->unlock(); |
| 1103 | #else |
| 1104 | pthread_mutex_lock( &m_receiveMutex ); |
| 1105 | message m; |
| 1106 | m.id = readInt(); |
| 1107 | const int s = readInt(); |
| 1108 | for( int i = 0; i < s; ++i ) |
| 1109 | { |
| 1110 | m.data.push_back( readString() ); |
| 1111 | } |
| 1112 | pthread_mutex_unlock( &m_receiveMutex ); |
| 1113 | #endif |
| 1114 | return m; |
| 1115 | } |
| 1116 | |
| 1117 | |
| 1118 |
no test coverage detected