Correctly link function
ran_func_kpm.c uses cp_ba_to_str(), but it is not defined in OAI. Define it so we can link properly, instead of relying on FlexRIC (where it was defined).
This commit is contained in:
@@ -72,3 +72,17 @@ byte_array_t cp_str_to_ba(const char* str)
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
char* cp_ba_to_str(const byte_array_t ba)
|
||||
{
|
||||
assert(ba.len > 0);
|
||||
|
||||
const size_t sz = ba.len;
|
||||
char* str = calloc(sz+1, sizeof(char));
|
||||
assert(str != NULL && "Memory exhausted");
|
||||
|
||||
memcpy(str, ba.buf, sz);
|
||||
str[sz] = '\0';
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user