summaryrefslogtreecommitdiff
path: root/vw-bap-frame.c
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2017-04-28 23:13:38 +0200
committernorly <ny-git@enpas.org>2017-04-28 23:13:38 +0200
commit04795b52688dde6f4ad0284a633f5ffb4aec80e0 (patch)
tree0c17e0aae07bc20312d14de79db2afd838e9c749 /vw-bap-frame.c
parentc93c33404af608d755ef05754dca3575aad79f56 (diff)
First working non-multiframe sending
Diffstat (limited to 'vw-bap-frame.c')
-rw-r--r--vw-bap-frame.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/vw-bap-frame.c b/vw-bap-frame.c
index 4fa2ec2..41d9e90 100644
--- a/vw-bap-frame.c
+++ b/vw-bap-frame.c
@@ -39,6 +39,26 @@ int vw_bap_frame_is_valid(struct BAP_Frame *bap_frame)
}
+struct BAP_Frame* vw_bap_frame_clone(struct BAP_Frame *bap_frame)
+{
+ struct BAP_Frame *new_frame;
+
+ if (!vw_bap_frame_is_valid(bap_frame)) {
+ return NULL;
+ }
+
+ new_frame = vw_bap_frame_alloc();
+ if (!new_frame) {
+ return NULL;
+ }
+
+ memcpy(new_frame, bap_frame, sizeof(*new_frame));
+
+ return new_frame;
+}
+
+
+
void vw_bap_frame_dump(struct BAP_Frame *bap_frame)
{
unsigned i;