void notifylist_remove(const char *mask) { NOTIFYLIST_REC *rec; g_return_if_fail(mask != NULL); rec = notifylist_find(mask, "*"); if (rec == NULL) return; notifylist_remove_config(rec); notifies = g_slist_remove(notifies, rec); signal_emit("notifylist remove", 1, rec); notify_destroy(rec); }
bool gatt_db_unregister(struct gatt_db *db, unsigned int id) { struct notify *notify; if (!db || !id) return false; notify = queue_find(db->notify_list, match_notify_id, UINT_TO_PTR(id)); if (!notify) return false; queue_remove(db->notify_list, notify); notify_destroy(notify); return true; }