[S] Change in osmo-pcu[master]: doc: add sample config to illustrate how to use an E1 CCU
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@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
dexter