diff options
author | David Robillard <d@drobilla.net> | 2012-06-29 23:06:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-06-29 23:06:19 +0000 |
commit | 8f7f419adcfcd6cd7557b82266b064ed242793ad (patch) | |
tree | e0004f6eec4958260df53c711ac2c92d85e8f4cc /src/server/events/Get.cpp | |
parent | 6eb584d3b0bc67fc8de36baba5e296d816ba080f (diff) | |
download | ingen-8f7f419adcfcd6cd7557b82266b064ed242793ad.tar.gz ingen-8f7f419adcfcd6cd7557b82266b064ed242793ad.tar.bz2 ingen-8f7f419adcfcd6cd7557b82266b064ed242793ad.zip |
Fix crashes caused by events attempting to respond to deleted clients (fix #842).
This one mainly manifested when using ingenish from the command line since the client is so short lived.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4503 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/Get.cpp')
-rw-r--r-- | src/server/events/Get.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index 6e0aafda..24f3d1d9 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -35,11 +35,11 @@ namespace Events { static void send_patch(Interface* client, const PatchImpl* patch); -Get::Get(Engine& engine, - Interface* client, - int32_t id, - SampleCount timestamp, - const Raul::URI& uri) +Get::Get(Engine& engine, + SharedPtr<Interface> client, + int32_t id, + SampleCount timestamp, + const Raul::URI& uri) : Event(engine, client, id, timestamp) , _uri(uri) , _object(NULL) @@ -130,7 +130,7 @@ Get::post_process() if (_uri == "ingen:plugins") { respond(SUCCESS); if (_request_client) { - _engine.broadcaster()->send_plugins_to(_request_client, _plugins); + _engine.broadcaster()->send_plugins_to(_request_client.get(), _plugins); } } else if (_uri == "ingen:engine") { respond(SUCCESS); @@ -154,11 +154,11 @@ Get::post_process() const PatchImpl* patch = NULL; const PortImpl* port = NULL; if ((patch = dynamic_cast<const PatchImpl*>(_object))) { - send_patch(_request_client, patch); + send_patch(_request_client.get(), patch); } else if ((node = dynamic_cast<const NodeImpl*>(_object))) { - send_node(_request_client, node); + send_node(_request_client.get(), node); } else if ((port = dynamic_cast<const PortImpl*>(_object))) { - send_port(_request_client, port); + send_port(_request_client.get(), port); } _request_client->bundle_end(); } else if (_plugin) { |