Mercurial > hg > piper-cpp
diff utilities/vampipe-server.cpp @ 55:38780f15ac8d
Make RequestResponse types more consistent by adding plugin to ConfigurationResponse and introducing a FinishRequest
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 19 Sep 2016 13:35:56 +0100 |
parents | e90fd30990eb |
children | 815e94fedc1c |
line wrap: on
line diff
--- a/utilities/vampipe-server.cpp Fri Sep 16 16:34:00 2016 +0100 +++ b/utilities/vampipe-server.cpp Mon Sep 19 13:35:56 2016 +0100 @@ -65,7 +65,7 @@ VampnProto::readVampRequest_Process(rr.processRequest, reader, mapper); break; case RRType::Finish: - VampnProto::readVampRequest_Finish(rr.finishPlugin, reader, mapper); + VampnProto::readVampRequest_Finish(rr.finishRequest, reader, mapper); break; case RRType::NotValid: break; @@ -95,7 +95,7 @@ VampnProto::buildVampResponse_Load(builder, rr.loadResponse, mapper); break; case RRType::Configure: - VampnProto::buildVampResponse_Configure(builder, rr.configurationResponse); + VampnProto::buildVampResponse_Configure(builder, rr.configurationResponse, mapper); break; case RRType::Process: VampnProto::buildVampResponse_Process(builder, rr.processResponse, mapper); @@ -196,9 +196,9 @@ case RRType::Finish: { - response.finishResponse.plugin = request.finishPlugin; + response.finishResponse.plugin = request.finishRequest.plugin; response.finishResponse.features = - request.finishPlugin->getRemainingFeatures(); + request.finishRequest.plugin->getRemainingFeatures(); // We do not delete the plugin here -- we need it in the // mapper when converting the features. It gets deleted by the @@ -249,9 +249,9 @@ cerr << "vampipe-server: response written" << endl; if (request.type == RRType::Finish) { - auto h = mapper.pluginToHandle(request.finishPlugin); + auto h = mapper.pluginToHandle(request.finishRequest.plugin); mapper.removePlugin(h); - delete request.finishPlugin; + delete request.finishRequest.plugin; } } catch (std::exception &e) {