Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 582ff0ac authored by Myles Watson's avatar Myles Watson
Browse files

Initialize all members in GATT entries

Bug: 304830775
Test: mma -j32
Change-Id: I634e09fa9849edff02f1c27e1c9cdde19b3987c8
parent e3481fe8
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -151,6 +151,8 @@ Database Database::Deserialize(const std::vector<StoredAttribute>& nv_attr,
        .uuid = attr.value.service.uuid,
        .is_primary = (attr.type == PRIMARY_SERVICE),
        .end_handle = attr.value.service.end_handle,
        .included_services = {},
        .characteristics = {},
    });
  }

@@ -193,6 +195,7 @@ Database Database::Deserialize(const std::vector<StoredAttribute>& nv_attr,
          .uuid = attr.value.characteristic.uuid,
          .value_handle = attr.value.characteristic.value_handle,
          .properties = attr.value.characteristic.properties,
          .descriptors = {},
      });

    } else {
@@ -205,7 +208,11 @@ Database Database::Deserialize(const std::vector<StoredAttribute>& nv_attr,

      } else {
        current_service_it->characteristics.back().descriptors.emplace_back(
            Descriptor{.handle = attr.handle, .uuid = attr.type});
            Descriptor{
                .handle = attr.handle,
                .uuid = attr.type,
                .characteristic_extended_properties = {},
            });
      }
    }
  }