sr_free_val(odl_username);
sr_free_val(odl_password);
- sr_free_values(values, count);
+ sr_free_values(values, count);
}
static void clean_current_docker_configuration(void);
printf("\n\n ========== CONFIG HAS CHANGED, CURRENT RUNNING CONFIG %s: ==========\n\n", module_name);
print_current_config(session, module_name);
- sr_val_t *val;
+ sr_val_t *val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/simulated-devices", &val);
}
sr_free_val(val);
+ val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/mounted-devices", &val);
{
printf("Cannot set mount value greater than number of simulated devices.\n");
sr_free_val(val);
+ val = NULL;
return SR_ERR_OK;
}
}
sr_free_val(val);
+ val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/notification-config/fault-notification-delay-period", &val);
}
sr_free_val(val);
+ val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/notification-config/ves-heartbeat-period", &val);
}
sr_free_val(val);
+ val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-ip", &val);
}
sr_free_val(val);
+ val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-port", &val);
}
sr_free_val(val);
+ val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-registration", &val);
}
sr_free_val(val);
+ val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/notification-config/is-netconf-available", &val);
}
sr_free_val(val);
+ val = NULL;
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/notification-config/is-ves-available", &val);
}
sr_free_val(val);
+ val = NULL;
return SR_ERR_OK;
sr_error:
printf("NTSimulator config change callback failed: %s.", sr_strerror(rc));
+ if (val != NULL)
+ {
+ sr_free_val(val);
+ val = NULL;
+ }
return rc;
}
if (rc != SR_ERR_OK)
{
printf("Could not get the operational state for the devices simulated.\n");
+ return SR_ERR_OPERATION_FAILED;
}
device_t *current_device = device_list->head;
sr_val_t **output, size_t *output_cnt, void *private_ctx)
{
int rc = SR_ERR_OK;
- sr_session_ctx_t *session = (sr_session_ctx_t *)private_ctx;
controller_t controller_list[CONTROLLER_LIST_MAX_LEN];
int controller_list_size = 0;
if (rc != SR_ERR_OK)
{
printf("Failed to add key pair to ODL.\n");
+ return SR_ERR_OPERATION_FAILED;
}
return rc;