Diff between 16669134e166a993bd76aa24222226300d4f3df6 and 70960a142a307b1fdfcefdf716956a753cb38de8

Changed Files

File Additions Deletions Status
src/attrib-server.c +2 -1 modified
src/service.c +5 -5 modified

Full Patch

diff --git a/src/attrib-server.c b/src/attrib-server.c
index 0f2cced..4439c27 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -41,6 +41,7 @@
 
 #include "btio/btio.h"
 #include "log.h"
+#include "backtrace.h"
 #include "adapter.h"
 #include "device.h"
 #include "src/shared/util.h"
@@ -1521,7 +1522,7 @@ static uint16_t find_uuid128_avail(struct btd_adapter *adapter, uint16_t nitems)
 uint16_t attrib_db_find_avail(struct btd_adapter *adapter, bt_uuid_t *svc_uuid,
 								uint16_t nitems)
 {
-	g_assert(nitems > 0);
+	btd_assert(nitems > 0);
 
 	if (svc_uuid->type == BT_UUID16)
 		return find_uuid16_avail(adapter, nitems);
diff --git a/src/service.c b/src/service.c
index 7da922c..3d07744 100644
--- a/src/service.c
+++ b/src/service.c
@@ -27,7 +27,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <assert.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdbool.h>
@@ -41,6 +40,7 @@
 #include "lib/sdp.h"
 
 #include "log.h"
+#include "backtrace.h"
 
 #include "adapter.h"
 #include "device.h"
@@ -92,8 +92,8 @@ static void change_state(struct btd_service *service, btd_service_state_t state,
 	if (state == old)
 		return;
 
-	assert(service->device != NULL);
-	assert(service->profile != NULL);
+	btd_assert(service->device != NULL);
+	btd_assert(service->profile != NULL);
 
 	service->state = state;
 	service->err = err;
@@ -155,7 +155,7 @@ int service_probe(struct btd_service *service)
 	char addr[18];
 	int err;
 
-	assert(service->state == BTD_SERVICE_STATE_UNAVAILABLE);
+	btd_assert(service->state == BTD_SERVICE_STATE_UNAVAILABLE);
 
 	err = service->profile->device_probe(service);
 	if (err == 0) {
@@ -299,7 +299,7 @@ struct btd_profile *btd_service_get_profile(const struct btd_service *service)
 
 void btd_service_set_user_data(struct btd_service *service, void *user_data)
 {
-	assert(service->state == BTD_SERVICE_STATE_UNAVAILABLE);
+	btd_assert(service->state == BTD_SERVICE_STATE_UNAVAILABLE);
 	service->user_data = user_data;
 }