Merge branch 'stable-1.2'

# Conflicts:
#	.gitmodules
#	.travis.yml
#	.travis/linux..before_install.sh
#	.travis/linux..install.sh
#	CMakeLists.txt
#	cmake/linux/package_linux.sh.in
#	cmake/modules/BuildPlugin.cmake
#	include/AutomatableModel.h
#	plugins/MidiImport/MidiImport.cpp
#	plugins/carlapatchbay/CMakeLists.txt
#	plugins/carlarack/CMakeLists.txt
#	src/core/Song.cpp
#	src/core/Track.cpp
#	src/gui/editors/SongEditor.cpp
#	tests/src/core/AutomatableModelTest.cpp
This commit is contained in:
Hyunjin Song
2020-04-04 12:08:55 +09:00
40 changed files with 329 additions and 160 deletions

View File

@@ -102,14 +102,14 @@ RemotePlugin::RemotePlugin() :
m_socketFile = QDir::tempPath() + QDir::separator() +
QUuid::createUuid().toString();
const char * path = m_socketFile.toUtf8().constData();
size_t length = strlen( path );
auto path = m_socketFile.toUtf8();
size_t length = path.length();
if ( length >= sizeof sa.sun_path )
{
length = sizeof sa.sun_path - 1;
qWarning( "Socket path too long." );
}
memcpy( sa.sun_path, path, length );
memcpy(sa.sun_path, path.constData(), length );
sa.sun_path[length] = '\0';
m_server = socket( PF_LOCAL, SOCK_STREAM, 0 );
@@ -117,7 +117,7 @@ RemotePlugin::RemotePlugin() :
{
qWarning( "Unable to start the server." );
}
remove( path );
remove(path.constData());
int ret = bind( m_server, (struct sockaddr *) &sa, sizeof sa );
if ( ret == -1 || listen( m_server, 1 ) == -1 )
{