Diff between fcd0c0c4cfac3fb3276f1019dfb70046573ec153 and 35c2fd92f827e61193b554e79c029948468e8b8c

Changed Files

File Additions Deletions Status
src/device.c +5 -0 modified
src/device.h +1 -0 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index d2bac97..c65f0b7 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1228,6 +1228,11 @@ gint device_address_cmp(struct btd_device *device, const gchar *address)
 	return strcasecmp(addr, address);
 }
 
+gint device_bdaddr_cmp(struct btd_device *device, bdaddr_t *bdaddr)
+{
+	return bacmp(&device->bdaddr, bdaddr);
+}
+
 static gboolean record_has_uuid(const sdp_record_t *rec,
 				const char *profile_uuid)
 {
diff --git a/src/device.h b/src/device.h
index edc64b9..f1d95c6 100644
--- a/src/device.h
+++ b/src/device.h
@@ -77,6 +77,7 @@ uint16_t btd_device_get_product(struct btd_device *device);
 uint16_t btd_device_get_version(struct btd_device *device);
 void device_remove(struct btd_device *device, gboolean remove_stored);
 gint device_address_cmp(struct btd_device *device, const gchar *address);
+gint device_bdaddr_cmp(struct btd_device *device, bdaddr_t *bdaddr);
 int device_browse_primary(struct btd_device *device, DBusConnection *conn,
 				DBusMessage *msg, gboolean secure);
 int device_browse_sdp(struct btd_device *device, DBusConnection *conn,