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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22580 ) Change subject: ns2: Don't start sending NS-RESET until FR DLC is available ...................................................................... ns2: Don't start sending NS-RESET until FR DLC is available There's no point in sending NS-RESET (or any other) messages to the underlying FR layer if the FR DLC has not been marked as available/active yet. Change-Id: Id4e7565ba166ca1d12f8800c643d9f2bc4d66873 Closes: OS#4999 --- M src/gb/gprs_ns2_fr.c 1 file changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/22580/1 diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c index 49e92ae..fc6a5c4 100644 --- a/src/gb/gprs_ns2_fr.c +++ b/src/gb/gprs_ns2_fr.c @@ -179,6 +179,17 @@ talloc_free(priv); } +static void fr_dlci_status_cb(struct osmo_fr_dlc *dlc, void *cb_data, bool active) +{ + struct gprs_ns2_vc *nsvc = cb_data; + + if (active) { + ns2_vc_fsm_start(nsvc); + } else { + ns2_vc_force_unconfigured(nsvc); + } +} + static struct priv_vc *fr_alloc_vc(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_vc *nsvc, uint16_t dlci) @@ -198,8 +209,9 @@ return NULL; } - priv->dlc->rx_cb_data = nsvc; + priv->dlc->cb_data = nsvc; priv->dlc->rx_cb = fr_dlci_rx_cb; + priv->dlc->status_cb = fr_dlci_status_cb; return priv; } @@ -756,7 +768,7 @@ } fr_link->tx_cb = fr_tx_cb; - fr_link->tx_cb_data = bind; + fr_link->cb_data = bind; priv->link = fr_link; priv->ifindex = rc = devname2ifindex(netif); @@ -899,8 +911,6 @@ nsvc->nsvci = nsvci; nsvc->nsvci_is_valid = true; - ns2_vc_fsm_start(nsvc); - return nsvc; err: -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22580 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id4e7565ba166ca1d12f8800c643d9f2bc4d66873 Gerrit-Change-Number: 22580 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210131/2743ca28/attachment.htm>