Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function(error){
if (!error) {
//console.log('[setup] services registered'.yellow);
_this.logger.info('BTLE services registered');
/* Register services. */
bleno.setServices(_this.services);
/* Fix handles. */
if (_this.keepHandles) {
_this.logger.info('Fixing Bleno handles ...');
_this.fixBlenoHandles(profile, _this.services);
}
} else {
//console.log('[setup] error while registering services !'.red);
_this.logger.error('cannot register services !');
}
};
})(this));
function onAdvertisingStarted(error) {
if (error) {
console.error(error);
return;
}
bleno.setServices(services);
}