Diff between 9e02ef2242cf4a5bc82231971d9384da3be1ab41 and 0b2918cd887d6802217c0abb7a105717248807d8

Changed Files

File Additions Deletions Status
src/profile.c +11 -1 modified

Full Patch

diff --git a/src/profile.c b/src/profile.c
index 7d56edc..b7f876e 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -159,6 +159,7 @@
 		<attribute id=\"0x0001\">				\
 			<sequence>					\
 				<uuid value=\"0x1101\" />		\
+				%s					\
 			</sequence>					\
 		</attribute>						\
 		<attribute id=\"0x0004\">				\
@@ -1423,8 +1424,17 @@ static char *get_hfp_ag_record(struct ext_profile *ext, struct ext_io *l2cap,
 static char *get_spp_record(struct ext_profile *ext, struct ext_io *l2cap,
 							struct ext_io *rfcomm)
 {
-	return g_strdup_printf(SPP_RECORD, rfcomm->chan, ext->version,
+	char *svc, *rec;
+
+	if (ext->service)
+		svc = g_strdup_printf("<uuid value=\"%s\" />", ext->service);
+	else
+		svc = g_strdup("");
+
+	rec = g_strdup_printf(SPP_RECORD, svc, rfcomm->chan, ext->version,
 								ext->name);
+	g_free(svc);
+	return rec;
 }
 
 static char *get_dun_record(struct ext_profile *ext, struct ext_io *l2cap,