RemotePlugin: improved management of shared memory keys
This commit is contained in:
@@ -1101,13 +1101,15 @@ void RemotePluginClient::setShmKey( key_t _key, int _size )
|
||||
{
|
||||
#ifdef USE_QT_SHMEM
|
||||
m_shmObj.setKey( QString::number( _key ) );
|
||||
if( m_shmObj.attach() )
|
||||
if( m_shmObj.attach() || m_shmObj.error() == QSharedMemory::NoError )
|
||||
{
|
||||
m_shm = (float *) m_shmObj.data();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugMessage( "failed getting shared memory\n" );
|
||||
char buf[64];
|
||||
sprintf( buf, "failed getting shared memory: %d\n", m_shmObj.error() );
|
||||
debugMessage( buf );
|
||||
}
|
||||
#else
|
||||
if( m_shm != NULL )
|
||||
|
||||
@@ -314,7 +314,7 @@ void RemotePlugin::resizeSharedProcessingMemory()
|
||||
#endif
|
||||
}
|
||||
|
||||
int shm_key = 0;
|
||||
static int shm_key = 0;
|
||||
#ifdef USE_QT_SHMEM
|
||||
do
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user