summaryrefslogtreecommitdiff
path: root/monitor/control.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-07-15 12:30:36 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-07-15 17:42:51 +0300
commit7bbf7c2b283a1e0c85fcb5fac2c7c1da0a474d4d (patch)
treee4c38cdb9e8dfdc9643815e3c780e5002d66bf07 /monitor/control.c
parent9ab95ccb76012aac85f689570e092672973aea46 (diff)
downloadbluez-7bbf7c2b283a1e0c85fcb5fac2c7c1da0a474d4d.tar.gz
monitor: Exit with error if failed to open file for writing
Diffstat (limited to 'monitor/control.c')
-rw-r--r--monitor/control.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/monitor/control.c b/monitor/control.c
index 9e30d38de..879e19572 100644
--- a/monitor/control.c
+++ b/monitor/control.c
@@ -996,9 +996,11 @@ void control_server(const char *path)
server_fd = fd;
}
-void control_writer(const char *path)
+bool control_writer(const char *path)
{
btsnoop_file = btsnoop_create(path, BTSNOOP_TYPE_MONITOR);
+
+ return !!btsnoop_file;
}
void control_reader(const char *path)