From: Wootak Jung Date: Thu, 16 Feb 2023 06:36:58 +0000 (+0900) Subject: adapter: Add adv data custom name handling logic X-Git-Tag: accepted/tizen/7.0/unified/20230327.042656~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e7e4df39ee0ed97f11b0011c6a6324375c46f72;p=platform%2Fupstream%2Fbluez.git adapter: Add adv data custom name handling logic If the name filed is not empty, custom name is already set Change-Id: Icf5aac6275fc09a3090a47283c994fbc69c9d7c3 Signed-off-by: Wootak Jung --- diff --git a/src/adapter.c b/src/adapter.c index cf2f1a9c..77cbd9d5 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -4332,7 +4332,7 @@ static int set_adv_data_device_name(uint8_t *adv_data, int adv_len, char *name) ad_len = data[i]; ad_type = data[i + 1]; - if (ad_type == EIR_NAME_COMPLETE) { + if (ad_type == EIR_NAME_COMPLETE && ad_len == 1) { /* Move to last position and update local name */ for (j = i; j < adv_len - 2; j++) adv_data[j] = data[j + 2];