dexter has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/37548?usp=email )
Change subject: pcuif_sock: do not retry when sending PCU version
......................................................................
pcuif_sock: do not retry when sending PCU version
When some client connects to the PCU socket, the PCU sends a TXT
indication with its version number in it. There is a retry mechanism
in place that checks if the BTS got active. In case the BTS is not
active yet, the TXT indication with the version number is repeated.
This mechanism is unnecessary. It even can cause annoyance in cas the
BTS on the other end does not send an info indication because it does
not use GPRS/EGPRS at all. The TXT indication is sent after the PCU
socket connection is made. We use a normal unix domain socket, which
can not lose messages. It is guaranteed that the TXT indication
reaches the client (BTS or BSC).
Related: OS#6270
Change-Id: Iddd3eed113ed288e629b6029f9a56de427de8126
---
M src/pcuif_sock.c
1 file changed, 22 insertions(+), 22 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/src/pcuif_sock.c b/src/pcuif_sock.c
index f8c0ecc..15b65ab 100644
--- a/src/pcuif_sock.c
+++ b/src/pcuif_sock.c
@@ -53,24 +53,6 @@
pcu_l1if_open();
}
-static void pcu_tx_txt_retry(void *_priv)
-{
- struct gprs_rlcmac_bts *bts;
- bool retry = llist_empty(&the_pcu->bts_list);
-
- llist_for_each_entry(bts, &the_pcu->bts_list, list) {
- if (bts->active)
- continue;
- retry = true;
- pcu_tx_txt_ind(PCU_VERSION, "%s", PACKAGE_VERSION);
- break;
- }
-
- /* If no BTS (or not all) yet active, retry */
- if (retry)
- osmo_timer_schedule(&pcu_sock_state.timer, 5, 0);
-}
-
int pcu_sock_send(struct msgb *msg)
{
struct osmo_fd *conn_bfd;
@@ -240,10 +222,6 @@
pcu_tx_txt_ind(PCU_VERSION, "%s", PACKAGE_VERSION);
- /* Schedule a timer so we keep trying until the BTS becomes active. */
- osmo_timer_setup(&pcu_sock_state.timer, pcu_tx_txt_retry, NULL);
- osmo_timer_schedule(&pcu_sock_state.timer, 5, 0);
-
return 0;
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/37548?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Iddd3eed113ed288e629b6029f9a56de427de8126
Gerrit-Change-Number: 37548
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged