Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec151a8a authored by Chris Manton's avatar Chris Manton
Browse files

legacy: Move tBTM_LOC_BD_NAME => bt_name

And also convert from signed to unsigned

Bug: 213933197
Tag: #refactor
Test: gd/cert/run
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Id1fb8b8bec0ee7957f5a0022d04db51ee4069104
parent 336da06a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ tBTM_STATUS BTM_SetLocalDeviceName(const char* p_name) {
  /* Save the device name if local storage is enabled */
  p = (uint8_t*)btm_cb.cfg.bd_name;
  if (p != (uint8_t*)p_name)
    strlcpy(btm_cb.cfg.bd_name, p_name, BTM_MAX_LOC_BD_NAME_LEN + 1);
    strlcpy((char*)btm_cb.cfg.bd_name, p_name, BTM_MAX_LOC_BD_NAME_LEN + 1);

  btsnd_hcic_change_name(p);
  return (BTM_CMD_STARTED);
@@ -348,7 +348,7 @@ tBTM_STATUS BTM_SetLocalDeviceName(const char* p_name) {
 *
 ******************************************************************************/
tBTM_STATUS BTM_ReadLocalDeviceName(const char** p_name) {
  *p_name = btm_cb.cfg.bd_name;
  *p_name = (const char*)btm_cb.cfg.bd_name;
  return (BTM_SUCCESS);
}

+0 −2
Original line number Diff line number Diff line
@@ -33,8 +33,6 @@
#include "types/hci_role.h"
#include "types/raw_address.h"

typedef char tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1];

typedef struct {
  uint16_t min_conn_int;
  uint16_t max_conn_int;
+4 −0
Original line number Diff line number Diff line
@@ -18,8 +18,10 @@

#ifdef __cplusplus
#include <cstdint>
#include <cstring>
#else
#include <stdint.h>
#include <string.h>
#endif

// NOTE: Shared with internal_include/bt_target.h
@@ -38,3 +40,5 @@ typedef uint8_t BD_NAME[BD_NAME_LEN + 1]; /* Device name */

/* Device name of peer (may be truncated to save space in BTM database) */
typedef uint8_t tBTM_BD_NAME[BTM_MAX_REM_BD_NAME_LEN + 1];

typedef uint8_t tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1];