adamdebreceni commented on a change in pull request #797:
URL: https://github.com/apache/nifi-minifi-cpp/pull/797#discussion_r440827688



##########
File path: extensions/coap/controllerservice/CoapConnector.cpp
##########
@@ -39,7 +39,7 @@ static core::Property RemoteServer;
 static core::Property Port;
 static core::Property MaxQueueSize;
 
-core::Property 
CoapConnectorService::RemoteServer(core::PropertyBuilder::createProperty("Remote
 Server")->withDescription("Remote CoAP server")->isRequired(true)->build());
+core::Property 
CoapConnectorService::RemoteServer(core::PropertyBuilder::createProperty("Remote
 Server")->withDescription("Remote CoAP server")->isRequired(false)->build());

Review comment:
       one of the tests did not provide the property and failed, from the code 
it seems like this service can handle it not being set
   
   ```
   void CoapConnectorService::onEnable() {
     std::string port_str;
     if (getProperty(RemoteServer.getName(), host_) && !host_.empty() && 
getProperty(Port.getName(), port_str) && !port_str.empty()) {
       core::Property::StringToInt(port_str, port_);
     } else {
       // this is the case where we aren't being used in the context of a 
single controller service.
       if (configuration_->get("nifi.c2.agent.coap.host", host_) && 
configuration_->get("nifi.c2.agent.coap.port", port_str)) {
         core::Property::StringToInt(port_str, port_);
       }
   
     }
   }
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to