dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31737 )
Change subject: pcu_l1_if: do not copy IMSI when it is NULL
......................................................................
pcu_l1_if: do not copy IMSI when it is NULL
The parameter imsi of pcu_l1if_tx_pch_dt() could be NULL. In those cases
we should ensure that struct gsm_pcu_if_pch_dt is populated with a zero
length string.
Related: OS#5198
Change-Id: I9192d50dd78be0a72ffdb9bfb9ed66aef085bcf1
---
M src/pcu_l1_if.cpp
1 file changed, 17 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/37/31737/1
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index b501826..c08f0bd 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -299,10 +299,11 @@
* it is not guaranteed to work with other message types. The prepended TLLI will be used as an identifier in
* the confirmation message. */
- struct gsm_pcu_if_pch_dt pch_dt;
+ struct gsm_pcu_if_pch_dt pch_dt = { 0 };
pch_dt.tlli = tlli;
- strcpy(pch_dt.imsi, imsi);
+ if (imsi)
+ strcpy(pch_dt.imsi, imsi);
pch_dt.data[0] = (plen << 2) | 0x01;
bitvec_pack(block, pch_dt.data + 1);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31737
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I9192d50dd78be0a72ffdb9bfb9ed66aef085bcf1
Gerrit-Change-Number: 31737
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31736 )
Change subject: doc: add sample config to illustrate how to use an E1 CCU
......................................................................
doc: add sample config to illustrate how to use an E1 CCU
Let's add an example to illustrate how to use an E1 CCU with OsmoPCU.
Change-Id: I1fd0bb6b0c3fe031d5241355c66b01b6ca45b1de
Related: OS#5198
---
A doc/examples/osmo-pcu.e1_ccu.cfg
M src/pcu_l1_if.cpp
2 files changed, 26 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/31736/1
diff --git a/doc/examples/osmo-pcu.e1_ccu.cfg b/doc/examples/osmo-pcu.e1_ccu.cfg
new file mode 100644
index 0000000..01f9b09
--- /dev/null
+++ b/doc/examples/osmo-pcu.e1_ccu.cfg
@@ -0,0 +1,9 @@
+pcu
+ flow-control-interval 10
+ cs 2
+ alloc-algorithm dynamic
+ gamma 0
+e1_input
+ e1_line 0 driver dahdi
+ e1_line 0 port 2
+ no e1_line 0 keepalive
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 570f7df..b501826 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -273,8 +273,11 @@
if (strlen(imsi) < IMSI_DIGITS_FOR_PAGING)
return;
- /* prepend last three IMSI digits from which BTS/BSC will calculate the paging group */
- memcpy(data, imsi+strlen(imsi)-IMSI_DIGITS_FOR_PAGING, IMSI_DIGITS_FOR_PAGING);
+ /* prepend last three IMSI digits (if present) from which BTS/BSC will calculate the paging group */
+ if (imsi && strlen(imsi) >= IMSI_DIGITS_FOR_PAGING)
+ memcpy(data, imsi + strlen(imsi) - IMSI_DIGITS_FOR_PAGING, IMSI_DIGITS_FOR_PAGING);
+ else
+ memset(data, '0', IMSI_DIGITS_FOR_PAGING);
/* block provided by upper layer comes without first byte (plen),
* prepend it manually:
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31736
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I1fd0bb6b0c3fe031d5241355c66b01b6ca45b1de
Gerrit-Change-Number: 31736
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31731 )
Change subject: pcu_sock: Submit all DATA.ind regardless of link quality
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31731
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I8f1856dd9061c1bfca8b15be30df7a51760231b0
Gerrit-Change-Number: 31731
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Mar 2023 17:12:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31725 )
Change subject: doc: add sample configuration for GPRS with ericsson RBS
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31725
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I923608d4edc28b02e882c5f04851a29fc11bad4e
Gerrit-Change-Number: 31725
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Mar 2023 17:09:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment