Skip to content

Commit

Permalink
changed variable name
Browse files Browse the repository at this point in the history
Signed-off-by: Arzon <[email protected]>
  • Loading branch information
Arzon committed Jun 19, 2020
1 parent 1b1299f commit 5911412
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ class NodeProperties {

var plannedPartySearchEnabled: Boolean = true

var messageForwardEnabled: Boolean = true
var serviceEnabled: Boolean = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ class AsyncTaskService(private val registryService: RegistryService, private val
fun forwardOcpiRequestToLinkedServices(requestHandler: OcpiRequestHandler<*>, fromLocalPlatform: Boolean = true) {
// we only want to forward to services if the module is one of the default OCPI modules,
// and only if the sender is a local platform (to avoid repeat forwarding on the recipient node)
// and also forward if message forward option is enabled
// and also forward if service interface option is enabled
val isDefaultModule = requestHandler.request.module != ModuleID.CUSTOM
val isEnabledForwarding = properties.messageForwardEnabled

if (isDefaultModule && fromLocalPlatform && isEnabledForwarding) {
if (isDefaultModule && fromLocalPlatform && properties.serviceEnabled) {
val request = requestHandler.request
registryService.getAgreementsByInterface(request.headers.sender, request.module, request.interfaceRole)
.forEach {
Expand Down

0 comments on commit 5911412

Please sign in to comment.