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/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgPatch Set 3: (4 comments) https://gerrit.osmocom.org/#/c/4018/3/src/vty/talloc_ctx_vty.c File src/vty/talloc_ctx_vty.c: Line 56: * @param depth Current depth value > What's the meaning of negative depth? There is no meaning. Line 58: * @param is_ref Is this chunk a reference? > So it's always used as boolean? Than the type should be bool. Well, this way I would have to rewrite the talloc library API. This definition was taken from the talloc documentation, and by changing types we will get a compiler warning. No way ;) Line 73: p->depth_pass = 0; > Sorry, I'm still kinda lost between all the goto and checks. Here you assig No problem, I will add a brief description here. Read the bottom comment first, please. So, a filter is being bypassed while current depth value is higher than the 'depth_pass', i.e. the callback does processing the child memory chunks. As soon as this condition becomes false, we need to 'enable' a filter, and resume the processing other chunks. Line 92: p->depth_pass = depth; > But here it's overwritten unless the return was triggered inside the switch In short, as soon as a filter passes any chunk, all the memory tree starting from one would be printed. To do that, we need to temporary 'disable' a filter for child chunks (depth > current). So, the 'depth_pass' is used to store a depth value, from which a filter is being bypassed. -- To view, visit https://gerrit.osmocom.org/4018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I43fc42880b22294d83c565ae600ac65e4f38b30d Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com> Gerrit-HasComments: Yes