aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@lamia.panaceas.james.local>2015-09-04 12:00:23 +0100
committerroot <root@lamia.panaceas.james.local>2015-09-04 12:00:23 +0100
commitcf8d69ad09fc425e6ffb4e5c40ee927c59ce1693 (patch)
tree80b8ed25404a4d1ab9fa3ac670f1ba12e50c714e
parent0c93bd91c87bc57e5e36f5d13958e9b4a759149f (diff)
downloadnrfdfu-cf8d69ad09fc425e6ffb4e5c40ee927c59ce1693.tar.gz
nrfdfu-cf8d69ad09fc425e6ffb4e5c40ee927c59ce1693.tar.bz2
nrfdfu-cf8d69ad09fc425e6ffb4e5c40ee927c59ce1693.zip
close only if openHEADmaster
-rw-r--r--dfu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/dfu.c b/dfu.c
index a2b252c..9dd83ed 100644
--- a/dfu.c
+++ b/dfu.c
@@ -245,11 +245,9 @@ dfu (const char *bdaddr, const char *type, const char *version, uint8_t * dat,
buf[0] = OP_CODE_SYS_RESET;
ble_send_cp_noresp (b, buf, 1);
sleep (1);
+ ble_close (b);
}
-
-
- ble_close (b);
return -1;
}