summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-14 19:01:03 +0000
committerDavid Robillard <d@drobilla.net>2012-01-14 19:01:03 +0000
commit35754a69e1653dd2586670031622fb2b01a220d1 (patch)
treee3bc4aeca01f20c6e08c099c6ce385cec60ca713 /src
parentf552cd3e49699ba96971265f9c8238761eb9c3bf (diff)
downloadingen-35754a69e1653dd2586670031622fb2b01a220d1.tar.gz
ingen-35754a69e1653dd2586670031622fb2b01a220d1.tar.bz2
ingen-35754a69e1653dd2586670031622fb2b01a220d1.zip
Fix crashes on shutdown (fix #805).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3942 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/server/ConnectionImpl.hpp14
-rw-r--r--src/server/DuplexPort.hpp2
-rw-r--r--src/server/InputPort.hpp6
3 files changed, 14 insertions, 8 deletions
diff --git a/src/server/ConnectionImpl.hpp b/src/server/ConnectionImpl.hpp
index 169f68e6..26b26c03 100644
--- a/src/server/ConnectionImpl.hpp
+++ b/src/server/ConnectionImpl.hpp
@@ -20,7 +20,7 @@
#include <cstdlib>
-#include <boost/intrusive/list.hpp>
+#include <boost/intrusive/slist.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/utility.hpp>
@@ -51,12 +51,16 @@ class BufferFactory;
* multiple connections (oblivious to the polyphonic situation of the
* connection itself).
*
+ * This is stored in an intrusive slist in InputPort.
+ *
* \ingroup engine
*/
-class ConnectionImpl : public Raul::Deletable
- , private Raul::Noncopyable
- , public Connection
- , public boost::intrusive::list_base_hook<>
+class ConnectionImpl
+ : public Raul::Deletable
+ , private Raul::Noncopyable
+ , public Connection
+ , public boost::intrusive::slist_base_hook<
+ boost::intrusive::link_mode<boost::intrusive::auto_unlink> >
{
public:
ConnectionImpl(PortImpl* src_port, PortImpl* dst_port);
diff --git a/src/server/DuplexPort.hpp b/src/server/DuplexPort.hpp
index aa174132..3b715130 100644
--- a/src/server/DuplexPort.hpp
+++ b/src/server/DuplexPort.hpp
@@ -45,7 +45,7 @@ public:
uint32_t index,
bool polyphonic,
uint32_t poly,
- PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size,
bool is_output);
diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp
index ccd651c7..542c3dd1 100644
--- a/src/server/InputPort.hpp
+++ b/src/server/InputPort.hpp
@@ -22,7 +22,7 @@
#include <cstdlib>
#include <string>
-#include <boost/intrusive/list.hpp>
+#include <boost/intrusive/slist.hpp>
#include "raul/SharedPtr.hpp"
@@ -63,7 +63,9 @@ public:
virtual ~InputPort() {}
- typedef boost::intrusive::list<ConnectionImpl> Connections;
+ typedef boost::intrusive::slist<ConnectionImpl,
+ boost::intrusive::constant_time_size<false>
+ > Connections;
void add_connection(ConnectionImpl* c);
ConnectionImpl* remove_connection(ProcessContext& context,