-
- // Need to apply config. Since config may need to be
- // applied across all threads, we do a callback to the parent thread.
- // wait for config to be applied and then send response
- _ref_policy_handler(DC_ADM_INT_CONTROL, (const char *) message->payload, message->len, response, true);
- std::memcpy( (char *) message->payload, response.c_str(), response.length());
- message->len = response.length();
- message->mtype = DC_ADM_INT_CONTROL_ACK;
- return true;
-
+ if(_ref_policy_handler != NULL){
+ // Need to apply config. Since config may need to be
+ // applied across all threads, we do a callback to the parent thread.
+ // wait for config to be applied and then send response
+ _ref_policy_handler(A1_POLICY_REQ, (const char *) message->payload, message->len, response, true);
+ std::memcpy( (char *) message->payload, response.c_str(), response.length());
+ message->len = response.length();
+ message->mtype = A1_POLICY_RESP;
+ send_msg = true;
+ }
+ else{
+ state = MISSING_HANDLER_ERROR;
+ mdclog_write(MDCLOG_ERR, "Error :: %s, %d :: Policy handler not assigned in message processor !", __FILE__, __LINE__);
+ }