[tcp] update Android build to include TCPlp (#7190)

This commit is contained in:
Sam Kumar
2021-11-22 00:49:11 -08:00
committed by Jonathan Hui
parent 44d0c3c12a
commit 097ab86369
2 changed files with 16 additions and 2 deletions
+13
View File
@@ -154,6 +154,7 @@ LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_CFLAGS += \
-DOPENTHREAD_ENABLE_ANDROID_NDK=1 \
-Wno-sign-compare \
$(NULL)
endif
@@ -473,6 +474,18 @@ LOCAL_SRC_FILES := \
third_party/mbedtls/repo/library/x509write_crt.c \
third_party/mbedtls/repo/library/x509write_csr.c \
third_party/mbedtls/repo/library/xtea.c \
third_party/tcplp/bsdtcp/tcp_usrreq.c \
third_party/tcplp/bsdtcp/tcp_subr.c \
third_party/tcplp/bsdtcp/tcp_output.c \
third_party/tcplp/bsdtcp/cc/cc_newreno.c \
third_party/tcplp/bsdtcp/tcp_reass.c \
third_party/tcplp/bsdtcp/tcp_timewait.c \
third_party/tcplp/bsdtcp/tcp_sack.c \
third_party/tcplp/bsdtcp/tcp_input.c \
third_party/tcplp/bsdtcp/tcp_timer.c \
third_party/tcplp/lib/bitmap.c \
third_party/tcplp/lib/cbuf.c \
third_party/tcplp/lib/lbuf.c \
$(OPENTHREAD_PROJECT_SRC_FILES) \
$(NULL)
+3 -2
View File
@@ -895,10 +895,11 @@ send:
size_t start_offset;
otLinkedBuffer* end;
size_t end_offset;
otLinkedBuffer* curr;
int rv = lbuf_getrange(&tp->sendbuf, off, len, &start, &start_offset, &end, &end_offset);
KASSERT(rv == 0, ("Reading send buffer out of range!\n"));
size_t message_offset = otMessageGetOffset(message) + sizeof(struct tcphdr) + optlen;
for (otLinkedBuffer* curr = start; curr != end->mNext; curr = curr->mNext) {
KASSERT(rv == 0, ("Reading send buffer out of range!\n"));
for (curr = start; curr != end->mNext; curr = curr->mNext) {
const uint8_t* data_to_copy = curr->mData;
size_t length_to_copy = curr->mLength;
if (curr == start) {