Verified Commit 15dd5318 authored by genofire's avatar genofire Committed by genofire
Browse files

reviewing

parent 77d19af5
......@@ -222,8 +222,10 @@ bool ble_shall_start(void)
int ret;
ret = ble_get_option("active", buf, sizeof(buf));
if (ret)
if (ret) {
LOG_INFO("ble", "BLE is disabled.");
return false;
}
if (strcmp(buf, "true") != 0) {
LOG_INFO("ble", "BLE is disabled.");
......
......@@ -34,6 +34,7 @@
#include <epicardium.h>
#include "modules/log.h"
#include "modules/modules.h"
#include "util/bstream.h"
#include "att_api.h"
......@@ -416,14 +417,16 @@ bool ble_fileTrans_start(void)
ret = ble_get_option("fileTrans", buf, sizeof(buf));
if (ret)
return true;
return !strcmp("true", buf);
return !strcmp(buf, "true");
}
/*
* This registers and starts the BLE file transfer service.
*/
void bleFileTransfer_init(void)
{
if (ble_fileTrans_start())
if (ble_fileTrans_start()) {
AttsAddGroup(&fileTransCfgGroup);
LOG_INFO("ble", "BLE fileTransfer is enabled.");
} else
LOG_INFO("ble", "BLE fileTransfer is disabled.");
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment