From 0b2918cd887d6802217c0abb7a105717248807d8 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 16 Nov 2012 15:48:09 +0200 Subject: [PATCH] core: Add support for custom SPP service UUIDs --- src/profile.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/profile.c b/src/profile.c index 7d56edcb3..b7f876e81 100644 --- a/src/profile.c +++ b/src/profile.c @@ -159,6 +159,7 @@ \ \ \ + %s \ \ \ \ @@ -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("", 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, -- 2.47.3