libosmocore[master]: ctrl: make response easier to parse

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Nov 24 13:41:02 UTC 2017


Patch Set 2: Code-Review-1

(1 comment)

I agree that human readable prose are not really fit for the CTRL response, but about parsing ease: it is easy to split by '\n' and ignore the first line. With this patch (we separate the value part and then) split the value by ';' to get the same result AFAICT; so there is no really profound improvement that justifies breaking compat, is there?

-1: found a talloc problem...

https://gerrit.osmocom.org/#/c/5023/2/src/ctrl/control_if.c
File src/ctrl/control_if.c:

Line 506: 		cmd->reply = talloc_asprintf_append(cmd->reply, "%s %"PRIu64";",
-1: before, this code did a talloc_asprintf() to bootstrap the cmd->reply from the cmd talloc context, now you start with appending to a NULL pointer. Instead, best use the ctrl_cmd_reply_printf() that you made me add to libosmocore ;)


-- 
To view, visit https://gerrit.osmocom.org/5023
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list