Attention is currently required from: laforge, pespin.
neels has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-cbc/+/28819
)
Change subject: sbcap: Log info about messages received and trasmitted
......................................................................
Patch Set 2:
(2 comments)
File src/sbcap/sbcap_common.c:
https://gerrit.osmocom.org/c/osmo-cbc/+/28819/comment/8394af11_8ad84526
PS2, Line 162: static char pdu_name[256] = "<unknown>";
may i suggest the pattern
int sbcap_pdu_get_name_buf(char *buf, size_t buflen, const ...)
{
(this function)
return sb.chars_needed;
}
char *sbcap_pdu_get_name_c(void *ctx, const ... )
{
OSMO_NAME_C_IMPL( ... )
}
- avoids adding static buf (e.g. via OTC_SELECT)
- can be used more than once per printf()
- can be re-used via OSMO_STRBUF_APPEND()
https://gerrit.osmocom.org/c/osmo-cbc/+/28819/comment/b51de4b3_c88485fe
PS2, Line 166: OSMO_STRBUF_PRINTF(sb, "%s", sbcap_procedure_code_str(pc));
are you sure about: sbcap_procedure_code_str() might return NULL
--
To view, visit
https://gerrit.osmocom.org/c/osmo-cbc/+/28819
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ifd1eca79bf4fac63de8066cd6a18004138d51d04
Gerrit-Change-Number: 28819
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 28 Jul 2022 20:38:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment