Attention is currently required from: Timur Davydov, fixeria, laforge, neels, osmith.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email ) Change subject: Add Emscripten build support and JS callback logging backend ...................................................................... Patch Set 26: (2 comments) File src/core/logging_emscripten.c: https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/05b17747_9b375ccc?usp=email : PS25, Line 47: char subsys_buf[16]; > This is kept at 16 bytes for consistency with `logging_gsmtap.c` […] That's due to "struct gsmtap_osmocore_log_hdr" being "char subsys[16]" because it's sent as fixed size over the wire. It may make sense to look at emscripten.h or on_log_wrapper() API doc to see if there's another limitation in your case. In practice 16 is fine, just mentioning in case you want to look at it. In any case, we tend to better use C style comments "/\* \*/" in osmocom code. File src/core/logging_emscripten.c: https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/ccc0bb60_bf465a68?usp=email : PS26, Line 45: const int msgLen = MAX_LOG_SIZE; Simply drop the variable and use MAX_LOG_SIZE directly, otherwise you are simply duplicating stuff and making code more complex for no good reason. char msg[MAX_LOG_SIZE]; rc = vsnprintf(msg, sizeof(msg), format, ap); if (rc <= 0) return; if (rc >= sizeof(msg)) rc = sizeof(msg) - 1; /* Drop newline at the end if exists: */ if (msg[rc - 1] == '\n') msg[rc - 1] = '\0'; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31 Gerrit-Change-Number: 41813 Gerrit-PatchSet: 26 Gerrit-Owner: Timur Davydov <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: neels <[email protected]> Gerrit-Reviewer: osmith <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-CC: laforge <[email protected]> Gerrit-Attention: osmith <[email protected]> Gerrit-Attention: neels <[email protected]> Gerrit-Attention: laforge <[email protected]> Gerrit-Attention: fixeria <[email protected]> Gerrit-Attention: Timur Davydov <[email protected]> Gerrit-Comment-Date: Wed, 04 Feb 2026 07:45:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <[email protected]> Comment-In-Reply-To: Timur Davydov <[email protected]>
