From 2e36c64796affc2d989c3106695cc9ce52f2860d Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 21 Apr 2020 18:13:22 +0200 Subject: [PATCH] Return a 0 for skipped events Not that any events get skipped at the moment. --- src/common/events.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/common/events.h b/src/common/events.h index 5155abfb..6c90c00e 100644 --- a/src/common/events.h +++ b/src/common/events.h @@ -35,11 +35,7 @@ class DefaultDataConverter { * Read data from the `data` void pointer into a an `EventPayload` value * that can be serialized and conveys the meaning of the event. * - * If this returns a nullopt, then the event won't be performed at all. Some - * plugins perform `audioMasterUpdateDisplay` host callbacks and apparently - * some hosts just outright crash when they receive these functions, so they - * have to be filtered out. Please let me know if there's some way to detect - * whether the host supports these callbacks before sending them! + * If this returns a nullopt, then the event will be skipped. */ virtual std::optional read(const int /*opcode*/, const int /*index*/, @@ -135,8 +131,9 @@ intptr_t send_event(boost::asio::local::stream_protocol::socket& socket, const std::optional payload = data_converter.read(opcode, index, value, data); if (!payload.has_value()) { - // A 1 usually means that the event was processed succesfully - return 1; + // A 0 usually means that the event was not supported by the other + // rendpoint + return 0; } if (logging.has_value()) {