Commit 62957b97 authored by Robert Schmidt's avatar Robert Schmidt

bugfix FlexRAN: only write to file if file is not null

parent 1e9f3235
...@@ -414,8 +414,14 @@ int flexran_agent_control_delegation(mid_t mod_id, const void *params, Protocol_ ...@@ -414,8 +414,14 @@ int flexran_agent_control_delegation(mid_t mod_id, const void *params, Protocol_
FILE *f; FILE *f;
f = fopen(target, "wb"); f = fopen(target, "wb");
if (f) {
fwrite(control_delegation_msg->payload.data, control_delegation_msg->payload.len, 1, f); fwrite(control_delegation_msg->payload.data, control_delegation_msg->payload.len, 1, f);
fclose(f); fclose(f);
}
else {
LOG_W(FLEXRAN_AGENT, "[%d] can not write control delegation data to %s\n",
mod_id, target);
}
// long time_elapsed_nanos = timer_end(vartime); // long time_elapsed_nanos = timer_end(vartime);
*msg = NULL; *msg = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment