From ca43f42b78f86aa1186156426197c66f302045f1 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sun, 23 Apr 2017 18:35:31 +0200 Subject: [PATCH] nrf5/bluetooth: Fixing bug found when testing microbit. Newly introduced advertisment data pointer was not cleared on nrf51 targets. Explicit set to NULL as no additional advertisment data is set. Raises a question on why the nrf51 static variable was not zero initialized. To be checked up. --- nrf5/bluetooth/ble_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nrf5/bluetooth/ble_uart.c b/nrf5/bluetooth/ble_uart.c index 7789da2f3a..bb5292bf5d 100644 --- a/nrf5/bluetooth/ble_uart.c +++ b/nrf5/bluetooth/ble_uart.c @@ -212,6 +212,7 @@ void ble_uart_init0(void) { m_adv_data_uart_service.p_device_name = (uint8_t *)device_name; m_adv_data_uart_service.device_name_len = strlen(device_name); m_adv_data_uart_service.connectable = true; + m_adv_data_uart_service.p_data = NULL; #if BLUETOOTH_WEBBLUETOOTH_REPL // for now point eddystone URL to https://goo.gl/x46FES => https://glennrub.github.io/webbluetooth/micropython/repl/