diff --git a/inc/Services/FunctionManagementService.hpp b/inc/Services/FunctionManagementService.hpp index 21920adfd80a467697e1dc23fa65c11d7da59706..a4973dd5cca956f91de583b4326aa9e8384b27e1 100644 --- a/inc/Services/FunctionManagementService.hpp +++ b/inc/Services/FunctionManagementService.hpp @@ -67,7 +67,7 @@ public: * int, for testing purposes. * @param msg A TC[8,1] message */ - int call(Message msg); + int call(Message& msg); /** * Includes a new function in the pointer map. This enables it to be called by way of a valid diff --git a/src/Services/FunctionManagementService.cpp b/src/Services/FunctionManagementService.cpp index 8cf94b79120b0592124150defc00c52150c3f2d1..c727e00d1cd81d6491a9f1b672c08ca3a47c04a7 100644 --- a/src/Services/FunctionManagementService.cpp +++ b/src/Services/FunctionManagementService.cpp @@ -30,11 +30,12 @@ * } */ -int FunctionManagementService::call(Message msg) { +int FunctionManagementService::call(Message& msg) { /** * @todo: Add test for message and service type using the ErrorHandler * @todo: Convert all functions to void (use error reports for tests instead of return numbers) */ + msg.resetRead(); ErrorHandler::assertInternal(msg.messageType == 1 && msg.serviceType == 8, ErrorHandler::InternalErrorType::UnacceptablePacket);