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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12266 ) Change subject: vty: show subscriber: put() before printing the use count ...................................................................... vty: show subscriber: put() before printing the use count Do not show the VTY command's own use count during 'show subscriber <ID>'. When using 'show subscriber msisdn 2023', I was surprised to see a use count of 2 and suspected a use count leak. With 'show subscriber cache' however, the use count is 1. So I realized it is the vty command's own use count that makes it two, besides the lu_complete=true one. Change-Id: Id02b57b7ed299b010b9f8b9e809548eb1e6aa699 --- M src/libmsc/msc_vty.c 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 87adc82..4e71e26 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -832,10 +832,13 @@ return CMD_WARNING; } - subscr_dump_full_vty(vty, vsub); - + /* In the vty output to the user, exclude this local use count added by vlr_subscr_get() in get_vsub_by_argv(). + * This works, because: for get_vsub_by_argv() to succeed, there *must* have been at least one use count before + * this, and since this is not multi-threaded, this vlr_subscr_put() cannot possibly reach a count of 0. */ vlr_subscr_put(vsub); + subscr_dump_full_vty(vty, vsub); + return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/12266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id02b57b7ed299b010b9f8b9e809548eb1e6aa699 Gerrit-Change-Number: 12266 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-CC: Max <msuraev at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181218/3efad1ac/attachment.htm>