Change in libosmocore[master]: gprs_ns2: move allocation of the SNS fsm into create_nse
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21571 ) Change subject: gprs_ns2: move allocation of the SNS fsm into create_nse .. gprs_ns2: move allocation of the SNS fsm into create_nse The allocation of the SNS fsm can be done in create_nse because the dialect is now known at that time. Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 --- M src/gb/gprs_ns2.c 1 file changed, 13 insertions(+), 6 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index 920fa68..890b656 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -677,6 +677,7 @@ enum gprs_ns2_ll linklayer, enum gprs_ns2_dialect dialect) { struct gprs_ns2_nse *nse; + char sns[16]; nse = gprs_ns2_nse_by_nsei(nsi, nsei); if (nse) { @@ -688,6 +689,15 @@ if (!nse) return NULL; + if (dialect == NS2_DIALECT_SNS) { + snprintf(sns, sizeof(sns), "NSE%05u-SNS", nsei); + nse->bss_sns_fi = ns2_sns_bss_fsm_alloc(nse, sns); + if (!nse->bss_sns_fi) { + talloc_free(nse); + return NULL; + } + } + nse->dialect = dialect; nse->ll = linklayer; nse->nsei = nsei; @@ -959,14 +969,11 @@ return -2; } - nsvc = gprs_ns2_ip_bind_connect(bind, nse, remote); - if (!nsvc) + if (!nse->bss_sns_fi) return -1; - if (!nse->bss_sns_fi) - nse->bss_sns_fi = ns2_sns_bss_fsm_alloc(nse, NULL); - - if (!nse->bss_sns_fi) + nsvc = gprs_ns2_ip_bind_connect(bind, nse, remote); + if (!nsvc) return -1; return ns2_sns_bss_fsm_start(nse, nsvc, remote); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 Gerrit-Change-Number: 21571 Gerrit-PatchSet: 8 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in libosmocore[master]: gprs_ns2: move allocation of the SNS fsm into create_nse
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21571 ) Change subject: gprs_ns2: move allocation of the SNS fsm into create_nse .. Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 Gerrit-Change-Number: 21571 Gerrit-PatchSet: 6 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 14 Dec 2020 11:34:19 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2: move allocation of the SNS fsm into create_nse
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21571 ) Change subject: gprs_ns2: move allocation of the SNS fsm into create_nse .. Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 Gerrit-Change-Number: 21571 Gerrit-PatchSet: 6 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 14 Dec 2020 09:44:22 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2: move allocation of the SNS fsm into create_nse
Hello Jenkins Builder, laforge, daniel, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/21571 to look at the new patch set (#5). Change subject: gprs_ns2: move allocation of the SNS fsm into create_nse .. gprs_ns2: move allocation of the SNS fsm into create_nse The allocation of the SNS fsm can be done in create_nse because the dialect is now known at that time. Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 --- M src/gb/gprs_ns2.c 1 file changed, 13 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/21571/5 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 Gerrit-Change-Number: 21571 Gerrit-PatchSet: 5 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset
Change in libosmocore[master]: gprs_ns2: move allocation of the SNS fsm into create_nse
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21571 ) Change subject: gprs_ns2: move allocation of the SNS fsm into create_nse .. Patch Set 4: (2 comments) https://gerrit.osmocom.org/c/libosmocore/+/21571/2/src/gb/gprs_ns2.c File src/gb/gprs_ns2.c: https://gerrit.osmocom.org/c/libosmocore/+/21571/2/src/gb/gprs_ns2.c@693 PS2, Line 693: snprintf(sns, sizeof(sns), "nse-%d-sns", nsei); > NSE%05u-SNS so stay in line with e.g. […] Ack https://gerrit.osmocom.org/c/libosmocore/+/21571/2/src/gb/gprs_ns2.c@694 PS2, Line 694: nse->bss_sns_fi = ns2_sns_bss_fsm_alloc(nse, NULL); > _alloc(nse, sns); Ack -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 Gerrit-Change-Number: 21571 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 14 Dec 2020 00:57:55 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: daniel Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2: move allocation of the SNS fsm into create_nse
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21571 ) Change subject: gprs_ns2: move allocation of the SNS fsm into create_nse .. Patch Set 4: Code-Review-1 (2 comments) https://gerrit.osmocom.org/c/libosmocore/+/21571/2/src/gb/gprs_ns2.c File src/gb/gprs_ns2.c: https://gerrit.osmocom.org/c/libosmocore/+/21571/2/src/gb/gprs_ns2.c@693 PS2, Line 693: snprintf(sns, sizeof(sns), "nse-%d-sns", nsei); NSE%05u-SNS so stay in line with e.g. the BSSGP FSM https://gerrit.osmocom.org/c/libosmocore/+/21571/2/src/gb/gprs_ns2.c@694 PS2, Line 694: nse->bss_sns_fi = ns2_sns_bss_fsm_alloc(nse, NULL); _alloc(nse, sns); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 Gerrit-Change-Number: 21571 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 11 Dec 2020 11:00:28 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2: move allocation of the SNS fsm into create_nse
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21571 ) Change subject: gprs_ns2: move allocation of the SNS fsm into create_nse .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 Gerrit-Change-Number: 21571 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 09 Dec 2020 16:16:34 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2: move allocation of the SNS fsm into create_nse
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21571 ) Change subject: gprs_ns2: move allocation of the SNS fsm into create_nse .. gprs_ns2: move allocation of the SNS fsm into create_nse The allocation of the SNS fsm can be done in create_nse because the dialect is now known at that time. Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 --- M src/gb/gprs_ns2.c 1 file changed, 13 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/21571/1 diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index 920fa68..57590a5 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -677,6 +677,7 @@ enum gprs_ns2_ll linklayer, enum gprs_ns2_dialect dialect) { struct gprs_ns2_nse *nse; + char sns[16]; nse = gprs_ns2_nse_by_nsei(nsi, nsei); if (nse) { @@ -688,6 +689,15 @@ if (!nse) return NULL; + if (dialect == NS2_DIALECT_SNS) { + snprintf(sns, sizeof(sns), "nse-%d-sns", nsei); + nse->bss_sns_fi = ns2_sns_bss_fsm_alloc(nse, NULL); + if (!nse->bss_sns_fi) { + talloc_free(nse); + return NULL; + } + } + nse->dialect = dialect; nse->ll = linklayer; nse->nsei = nsei; @@ -959,14 +969,11 @@ return -2; } - nsvc = gprs_ns2_ip_bind_connect(bind, nse, remote); - if (!nsvc) + if (!nse->bss_sns_fi) return -1; - if (!nse->bss_sns_fi) - nse->bss_sns_fi = ns2_sns_bss_fsm_alloc(nse, NULL); - - if (!nse->bss_sns_fi) + nsvc = gprs_ns2_ip_bind_connect(bind, nse, remote); + if (!nsvc) return -1; return ns2_sns_bss_fsm_start(nse, nsvc, remote); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I64e1f3dcc63d38e65bb486c9ac08d4032b7ad222 Gerrit-Change-Number: 21571 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-MessageType: newchange