Potential NMBS_ERROR_INVALID_ARGUMENT
when calling nmbs_create()
#65
Labels
NMBS_ERROR_INVALID_ARGUMENT
when calling nmbs_create()
#65
Following #55 I realized that there was no way to check if the new
crc_calc()
function pointer was defined by the user or not, since there is no guarantee that the user initializes thenmbs_platform_conf
struct to zero.For this reason, with #64 (which marks version 1.18.0), I introduced 2 new
_create()
APIs that the user must call to create thenmbs_platform_conf
andnmbs_callbacks
struct,nmbs_platform_conf_create()
andnmbs_callbacks_create()
.To force the usage of these functions inside old codebases, I introduced a runtime check inside
nmbs_create()
andnmbs_server_create()
returningNMBS_ERROR_INVALID_ARGUMENT
when one of these structs is not initialized properly.The text was updated successfully, but these errors were encountered: