diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-13 14:56:55 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-13 14:58:19 +0100 |
commit | 857281f7ff904f2c8714c938a693d3a49084f4fc (patch) | |
tree | bb32357385250f9f5076d2e8a970cd90a78e867b /src/llc.cpp | |
parent | d26318e4a71e931113b13df1da239ccf3b978d21 (diff) |
llc: Remove one of the two variants to put data into the frame
Diffstat (limited to 'src/llc.cpp')
-rw-r--r-- | src/llc.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/llc.cpp b/src/llc.cpp index a4fd7afa..524814cf 100644 --- a/src/llc.cpp +++ b/src/llc.cpp @@ -22,6 +22,8 @@ #include <tbf.h> #include <bts.h> +#include <stdio.h> + extern "C" { #include <osmocom/core/msgb.h> } @@ -45,6 +47,10 @@ void gprs_llc::enqueue(struct msgb *llc_msg) void gprs_llc::put_frame(const uint8_t *data, size_t len) { + /* only put frames when we are empty */ + OSMO_ASSERT(index == 0 && length == 0); + + /* TODO: bounds check */ memcpy(frame, data, len); length = len; } @@ -68,11 +74,3 @@ struct msgb *gprs_llc::dequeue() { return msgb_dequeue(&queue); } - -void gprs_llc::update_frame(struct msgb *msg) -{ - /* TODO: assert that index is 0 now */ - /* TODO: bounds check */ - memcpy(frame, msg->data, msg->len); - length = msg->len; -} |