Open abqjln opened 2 weeks ago
You shouldn't do g_byte_array_free( gbarray, TRUE );
. The library will free it once it is not needed anymore.
Thank you!--that explains other issues I am having. My server has global structures with GByteArray elements to serve mullitple clients--the second client always fails, suspect due to having been freed. I will test. using local temporary GByteArrays.
Infrastructure is all there, but did not find this cb. Used to free temporary GByteArrays after binc_application_set_char_values.
Ex: when central/client requests a characteristic read , my server does GByteArray gbarray = g_byte_array_new(); g_byte_array_append( gbarray, &value, 1); binc_application_set_char_value(application, service_uuid, char_uuid, gbarray ); g_byte_array_free( gbarray, TRUE ); --> IF DO THIS Glib fails with g_atomic_ref_count_dec: assertion 'old_value > 0'
Putting the free in this cb frees only after the gbarray above is consumed.