We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
while(g_variant_iter_loop (iter, "{&sv}", &key, &value)){ ..... g_variant_unref(value); }
g_variant_iter_loop awalys memory 264kb increasing
I changed:
while (g_variant_iter_next(iter, "{sv}", &key, &value)) { //GATTLIB_LOG(GATTLIB_DEBUG, "on_handle_characteristic_property_change: %s:%s", //> > key, g_variant_print(value, TRUE)); GATTLIB_LOG(GATTLIB_DEBUG, "haha while"); if (strcmp(key, "Value") == 0) { uuid_t uuid; size_t data_length; const uint8_t* data = g_variant_get_fixed_array(value, &data_length, sizeof(guchar));
gattlib_string_to_uuid( org_bluez_gatt_characteristic1_get_uuid(object), MAX_LEN_UUID_STR + 1, &uuid); gattlib_call_notification_handler(&connection->notification, &uuid, data, data_length); } g_free(key); g_variant_unref(value); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
--------------file:
gattlib_notification.c
--------------method:
static gboolean on_handle_characteristic_property_change(
OrgBluezGattCharacteristic1 *object,
GVariant *arg_changed_properties,
const gchar *const *arg_invalidated_properties,
gpointer user_data)
while(g_variant_iter_loop (iter, "{&sv}", &key, &value)){
.....
g_variant_unref(value);
}
g_variant_iter_loop awalys memory 264kb increasing
I changed:
while (g_variant_iter_next(iter, "{sv}", &key, &value)) {
//GATTLIB_LOG(GATTLIB_DEBUG, "on_handle_characteristic_property_change: %s:%s",
//> > key, g_variant_print(value, TRUE));
GATTLIB_LOG(GATTLIB_DEBUG, "haha while");
if (strcmp(key, "Value") == 0) {
uuid_t uuid;
size_t data_length;
const uint8_t* data = g_variant_get_fixed_array(value, &data_length, sizeof(guchar));
The text was updated successfully, but these errors were encountered: