Attention is currently required from: neels.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email )
Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File include/osmocom/core/utils.h:
https://gerrit.osmocom.org/c/libosmocore/+/35207/comment/c3dba968_29edcd21
PS1, Line 329: } while (0)
What is the advantage of having these long macros instead of turning them into (probably more readable) functions?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4
Gerrit-Change-Number: 35207
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 04 Dec 2023 08:23:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35210?usp=email )
Change subject: [do not merge] test gerrit verifications
......................................................................
[do not merge] test gerrit verifications
Change-Id: I6a491a9b36299443be72b41bc13cac7242b088f4
---
A test
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/10/35210/1
diff --git a/test b/test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35210?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I6a491a9b36299443be72b41bc13cac7242b088f4
Gerrit-Change-Number: 35210
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/35209?usp=email )
Change subject: [do not merge] test gerrit verifications
......................................................................
Abandoned
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/35209?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ia506922e0c47b0a0329048dba5ac433c17b6b484
Gerrit-Change-Number: 35209
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: abandon
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/35209?usp=email )
Change subject: [do not merge] test gerrit verifications
......................................................................
[do not merge] test gerrit verifications
Change-Id: Ia506922e0c47b0a0329048dba5ac433c17b6b484
---
A test
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/09/35209/1
diff --git a/test b/test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/35209?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ia506922e0c47b0a0329048dba5ac433c17b6b484
Gerrit-Change-Number: 35209
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35206?usp=email )
Change subject: util: add OSMO_STRBUF_REMAIN()
......................................................................
util: add OSMO_STRBUF_REMAIN()
This code already exists twice, and upcoming patch will need this as
well in logging.c. Add a macro to remove the code dup.
Related: OS#6284
Related: Ib577a5e0d7450ce93ff21f37ba3262704cbf4752
Change-Id: I6f2991125882bff948708bbb4ae218f9f3d1e50c
---
M include/osmocom/core/utils.h
1 file changed, 19 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/06/35206/1
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index ee7cfa4..2a3670b 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -249,7 +249,7 @@
#define OSMO_STRBUF_APPEND(STRBUF, func, args...) do { \
if (!(STRBUF).pos) \
(STRBUF).pos = (STRBUF).buf; \
- size_t _sb_remain = (STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0; \
+ size_t _sb_remain = OSMO_STRBUF_REMAIN(STRBUF); \
int _sb_l = func((STRBUF).pos, _sb_remain, ##args); \
if (_sb_l < 0 || (size_t)_sb_l > _sb_remain) \
(STRBUF).pos = (STRBUF).buf + (STRBUF).len; \
@@ -281,6 +281,9 @@
#define OSMO_STRBUF_PRINTF(STRBUF, fmt, args...) \
OSMO_STRBUF_APPEND(STRBUF, snprintf, fmt, ##args)
+/*! Return remaining space for characters and terminating nul in the given struct osmo_strbuf. */
+#define OSMO_STRBUF_REMAIN(STRBUF) ((STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0)
+
/*! Like OSMO_STRBUF_APPEND(), but for function signatures that return the char* buffer instead of a length.
* When using this function, the final STRBUF.chars_needed may not reflect the actual number of characters needed, since
* that number cannot be obtained from this kind of function signature.
@@ -292,7 +295,7 @@
#define OSMO_STRBUF_APPEND_NOLEN(STRBUF, func, args...) do { \
if (!(STRBUF).pos) \
(STRBUF).pos = (STRBUF).buf; \
- size_t _sb_remain = (STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0; \
+ size_t _sb_remain = OSMO_STRBUF_REMAIN(STRBUF); \
if (_sb_remain) { \
func((STRBUF).pos, _sb_remain, ##args); \
} \
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35206?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6f2991125882bff948708bbb4ae218f9f3d1e50c
Gerrit-Change-Number: 35206
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria, jolly, laforge, neels.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35172?usp=email )
Change subject: soft_uart: implement modem status lines and flow control
......................................................................
Patch Set 4:
(1 comment)
File src/core/soft_uart.c:
https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/95d07b17_78756b83
PS2, Line 398: if (active) /* assert the given line */
> re: if assert and de-assert is terminology from the matching spec, then of course keep using those terms here. (could have one comment in the first occurence to explain the term usage maybe)
ack
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35172?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I26b93ce76f2f6b6fbf017f2684312007db3c6d48
Gerrit-Change-Number: 35172
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: jolly <andreas(a)eversberg.eu>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 04 Dec 2023 06:40:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment