Attention is currently required from: Timur Davydov, fixeria, laforge, neels, osmith.
2 comments:
File src/core/logging_emscripten.c:
Patch Set #25, 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:
Patch Set #26, 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 change 41813. To unsubscribe, or for help writing mail filters, visit settings.