mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-06 07:51:56 +00:00
For stream-based protocols (TCP), adding less data than requested ("short write") is generally not a problem - the rest of data can be sent in the next packet. So, make net_pkt_append() return length of written data instead of just bool flag, which makes it closer to the behavior of POSIX send()/write() calls. There're many users of older net_pkt_append() in the codebase however, so net_pkt_append_all() convenience function is added which keeps returning a boolean flag. All current users were converted to this function, except for two: samples/net/http_server/src/ssl_utils.c samples/net/mbedtls_sslclient/src/tcp.c Both are related to TLS and implement mbedTLS "tx callback", which follows POSIX short-write semantics. Both cases also had a code to workaround previous boolean-only behavior of net_pkt_append() - after calling it, they measured length of the actual data added (but only in case of successful return of net_pkt_append(), so that didn't really help). So, these 2 cases are already improved. Jira: ZEP-1984 Change-Id: Ibaf7c029b15e91b516d73dab3612eed190ee982b Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org> |
||
---|---|---|
.known-issues | ||
arch | ||
boards | ||
doc | ||
drivers | ||
dts | ||
ext | ||
include | ||
kernel | ||
lib | ||
misc | ||
samples | ||
scripts | ||
subsys | ||
tests | ||
.checkpatch.conf | ||
.gitattributes | ||
.gitignore | ||
.gitlint | ||
.gitreview | ||
.mailmap | ||
.shippable.yml | ||
defaults.tc | ||
Kbuild | ||
Kconfig | ||
Kconfig.zephyr | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
Makefile.inc | ||
Makefile.test | ||
zephyr-env.sh |