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. Change subject: Don't overwrite existing data in osmo_ss7_instance_find_or_create() ...................................................................... Don't overwrite existing data in osmo_ss7_instance_find_or_create() If we actually found an instance for the specified ID, return it fast and don't (re)initialize all linked list heads, etc. Change-Id: I91b6aabdb873ed8dd103918ee5e40b7ad3946735 --- M src/osmo_ss7.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 27e56af..9b2377b 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -315,8 +315,10 @@ OSMO_ASSERT(ss7_initialized); inst = osmo_ss7_instance_find(id); - if (!inst) - inst = talloc_zero(ctx, struct osmo_ss7_instance); + if (inst) + return inst; + + inst = talloc_zero(ctx, struct osmo_ss7_instance); if (!inst) return NULL; -- To view, visit https://gerrit.osmocom.org/2336 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91b6aabdb873ed8dd103918ee5e40b7ad3946735 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder