Skip to content

Commit

Permalink
replay bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jslawek committed Apr 6, 2017
1 parent 99cb94f commit d631f7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gattacker",
"version": "0.2.0",
"version": "0.2.1",
"description": "GATTacker",
"author": "Slawomir Jasek <slawekj@gmail.com>",
"repository": {
Expand Down
7 changes: 4 additions & 3 deletions replay.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if ( !opt.options.input || !opt.options.peripheral) {
console.info(options.getHelp());
process.exit(0);
}
var peripheralId = opt.options.peripheral;

if (opt.options.services) {
if (opt.options.services.indexOf('.srv.json') > -1 ) {
Expand All @@ -31,6 +32,7 @@ if (opt.options.services) {
servicesFile=opt.options.services + '.srv.json';
}
} else {
var devicesPath=process.env.DEVICES_PATH;
servicesFile = devicesPath+ '/'+peripheralId+'.srv.json';
}

Expand All @@ -40,7 +42,6 @@ var waiting = false;
var wsclient = require('./lib/ws-client');

var inputData = fs.createReadStream(opt.options.input,'utf8');
var peripheralId = opt.options.peripheral;


function readLines(input, func) {
Expand Down Expand Up @@ -97,9 +98,9 @@ function parse(line) {
}
}); break;

case '> R' : console.log('READ: '.green + data + ' --- skip');
case '> R' : console.log('READ: '.grey + data + ' --- skip');
break
case '> N' : console.log('NOTIFICATION: '.green + data + ' --- skip');
case '> N' : console.log('NOTIFICATION: '.grey + data + ' --- skip');
break
}

Expand Down

0 comments on commit d631f7f

Please sign in to comment.