commit | 06eb3d80452feb284c0ef475cbd5976457686142 | [log] [tgz] |
---|---|---|
author | Szymon Janc <szymon.janc@codecoup.pl> | Fri Feb 23 14:40:10 2018 +0100 |
committer | Szymon Janc <szymon.janc@codecoup.pl> | Mon Feb 26 13:54:03 2018 +0100 |
tree | 49023c070fbb34fec1d03f0b35d7654764471f6d | |
parent | 48a2c3db1ccff28a615fac56066ca7d721f98d0a [diff] |
shared/btp: Allow to call btp_send without valid btp This allows to unconditionally call btp_send from code that generates events eg when mapping those from D-Bus events.
diff --git a/src/shared/btp.c b/src/shared/btp.c index 7762267..93df37a 100644 --- a/src/shared/btp.c +++ b/src/shared/btp.c
@@ -294,6 +294,9 @@ struct pending_message *msg; size_t len; + if (!btp) + return false; + len = sizeof(*hdr) + length; hdr = l_malloc(len); if (!hdr)