List with UUIDs per-adapter should be sorted
diff --git a/src/adapter.c b/src/adapter.c
index 8fc47b9..c174793 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1081,8 +1081,9 @@
 		adapter = adapters->data;
 
 		if (insert == TRUE)
-			adapter->services = sdp_list_append(adapter->services,
-									rec);
+			adapter->services = sdp_list_insert_sorted(
+							adapter->services, rec,
+							record_sort);
 		else
 			adapter->services = sdp_list_remove(adapter->services,
 									rec);
diff --git a/src/sdpd-database.c b/src/sdpd-database.c
index 224a4e7..263b16e 100644
--- a/src/sdpd-database.c
+++ b/src/sdpd-database.c
@@ -55,7 +55,7 @@
  * The service repository is a linked list in sorted order
  * and the service record handle is the sort key
  */
-static int record_sort(const void *r1, const void *r2)
+int record_sort(const void *r1, const void *r2)
 {
 	const sdp_record_t *rec1 = (const sdp_record_t *) r1;
 	const sdp_record_t *rec2 = (const sdp_record_t *) r2;
diff --git a/src/sdpd.h b/src/sdpd.h
index 1f0a229..ce189ca 100644
--- a/src/sdpd.h
+++ b/src/sdpd.h
@@ -70,6 +70,7 @@
 void sdp_cstate_cache_init(void);
 void sdp_cstate_clean_buf(void);
 
+int record_sort(const void *r1, const void *r2);
 void sdp_svcdb_reset(void);
 void sdp_svcdb_collect_all(int sock);
 void sdp_svcdb_set_collectable(sdp_record_t *rec, int sock);