Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
feat(status): return the status task on storage encryption
Browse files Browse the repository at this point in the history
Signed-off-by: Rafa Hernandez <rhernandez@teclib.com>
  • Loading branch information
rafaelje authored and ajsb85 committed Mar 17, 2018
1 parent 72fa366 commit 68636a0
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -612,9 +612,14 @@ public void messageArrived(String topic, MqttMessage message) throws Exception {
if(topic.toLowerCase().contains(STORAGE_ENCRYPTION.toLowerCase())) {
try {
JSONObject jsonObj = new JSONObject(messageBody);

if(jsonObj.has(STORAGE_ENCRYPTION)) {
boolean enable = jsonObj.getBoolean(STORAGE_ENCRYPTION);
String taskId = jsonObj.getString("taskId");

// return the status of the task
policiesController.sendTaskStatus(taskId, DEFAULT_TASK_ESTATUS);

// execute the policy
policiesController.storageEncryption(enable);
}
} catch (Exception ex) {
Expand Down

0 comments on commit 68636a0

Please sign in to comment.