diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-11-03 17:14:37 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-11-04 14:34:14 -0700 |
commit | 3a3298e29b4468bd6cbf74de6d677c052a4e960a (patch) | |
tree | 9ab7b3886621f85cc26c962e8d8b14ea28ed7975 /monitor/l2cap.h | |
parent | f9657b86ddd3008768b3f6fef2c94eec46d976b5 (diff) | |
download | bluez-3a3298e29b4468bd6cbf74de6d677c052a4e960a.tar.gz |
monitor/att: Add handler support for Read by Type
This adds handler support for Read by Type so it can further decode
the values when the procedure is used.
Diffstat (limited to 'monitor/l2cap.h')
-rw-r--r-- | monitor/l2cap.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/monitor/l2cap.h b/monitor/l2cap.h index e63377857..935066e6e 100644 --- a/monitor/l2cap.h +++ b/monitor/l2cap.h @@ -31,8 +31,9 @@ void l2cap_frame_init(struct l2cap_frame *frame, uint16_t index, bool in, uint16_t cid, uint16_t psm, const void *data, uint16_t size); -static inline void l2cap_frame_clone(struct l2cap_frame *frame, - const struct l2cap_frame *source) +static inline void l2cap_frame_clone_size(struct l2cap_frame *frame, + const struct l2cap_frame *source, + uint16_t size) { if (frame != source) { frame->index = source->index; @@ -44,10 +45,16 @@ static inline void l2cap_frame_clone(struct l2cap_frame *frame, frame->chan = source->chan; frame->mode = source->mode; frame->data = source->data; - frame->size = source->size; + frame->size = size; } } +static inline void l2cap_frame_clone(struct l2cap_frame *frame, + const struct l2cap_frame *source) +{ + l2cap_frame_clone_size(frame, source, source->size); +} + static inline void *l2cap_frame_pull(struct l2cap_frame *frame, const struct l2cap_frame *source, uint16_t len) { |