Skip to content

Commit

Permalink
Fixed ZeroEQ unsubsription of camera event
Browse files Browse the repository at this point in the history
  • Loading branch information
favreau committed Jul 7, 2017
1 parent c607b62 commit 2a1a01f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
15 changes: 1 addition & 14 deletions plugins/extensions/plugins/ZeroEQPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void ZeroEQPlugin::_onChangeEngine()
servus::Serializable::DeserializedCallback());

if (_httpServer)
_httpServer->remove(cam);
_httpServer->remove(ENDPOINT_CAMERA);

_requests.erase(::brayns::v1::Camera::ZEROBUF_TYPE_IDENTIFIER());

Expand Down Expand Up @@ -165,19 +165,6 @@ ::zeroeq::http::Server* ZeroEQPlugin::operator->()
return _httpServer.get();
}

void ZeroEQPlugin::handle(servus::Serializable& object)
{
if (_httpServer)
_httpServer->handle(object);
_subscriber.subscribe(object);
_requests[object.getTypeIdentifier()] = [&] {
return _publisher.publish(object);
};

// publish updates from HTTP to subscribers, e.g. livreGUI
object.registerDeserializedCallback([&] { _publisher.publish(object); });
}

void ZeroEQPlugin::_setupHTTPServer()
{
const strings& arguments =
Expand Down
4 changes: 0 additions & 4 deletions plugins/extensions/plugins/ZeroEQPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ class ZeroEQPlugin : public ExtensionPlugin
BRAYNS_API bool operator!() const;
BRAYNS_API::zeroeq::http::Server* operator->();

/** Handle the given objects in subscriber, publisher (via request) and HTTP
* server. */
BRAYNS_API void handle(servus::Serializable& object);

private:
/**
* @brief Initializes HTTP server
Expand Down

0 comments on commit 2a1a01f

Please sign in to comment.