openbsc[master]: libmsc: db_subscriber_alloc_exten() remove infinite loop

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/.

Pablo Neira Ayuso gerrit-no-reply at lists.osmocom.org
Tue Sep 12 14:09:37 UTC 2017


Patch Set 1:

I see... it's from the VTY itself that hangs with a valid configuration.

Would you send a v2 of this patch that does something like this?

... extension_alloc(...)
{
    range = max - min;
    extension = min + (rand() % range);
    return extension
}

Then:

    if extension is busy:
           extension++;
    if count == 100:
           extension = extension_alloc();

So the idea is that we don't call random() again, but try with next door extensions to see if they are available.

Play around with it to see if it cures the neverending loop there.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icf0f1e5a7f360bc27592a55890f74a9a12bc9f42
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pablo Neira Ayuso <pablo at gnumonks.org>
Gerrit-HasComments: No



More information about the gerrit-log mailing list