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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14259 ) Change subject: osmo-bts-oc2g: Fix status LED responsibilities ...................................................................... osmo-bts-oc2g: Fix status LED responsibilities osmo-bts-oc2g no longer modifies the status LED and instead leaves that to the bts manager. The service file now also creates a directory in /var/run needed for osmo-bts to communicate with oc2gbts-mgr. This status file is used by oc2gbts-mgr to figure out when the bts is operational. Related: SYS#4493 Change-Id: Ifae634c6c2ecec7d32298c0f266f91f3e81308f5 --- M contrib/systemd/osmo-bts-oc2g.service M src/osmo-bts-oc2g/main.c 2 files changed, 3 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/contrib/systemd/osmo-bts-oc2g.service b/contrib/systemd/osmo-bts-oc2g.service index 7b0168a..860aeb1 100644 --- a/contrib/systemd/osmo-bts-oc2g.service +++ b/contrib/systemd/osmo-bts-oc2g.service @@ -3,11 +3,8 @@ [Service] Type=simple -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr1/brightness' ExecStart=/usr/bin/osmo-bts-oc2g -s -c /etc/osmocom/osmo-bts-oc2g.cfg -M -ExecStopPost=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/usr1/brightness' +RuntimeDirectory=osmo-bts Restart=always RestartSec=2 RestartPreventExitStatus=1 diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c index 29fab47..5b66c6f 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -151,24 +151,16 @@ { static uint64_t states = 0; uint64_t old_states = states; - int led_rf_active_on; if (on) states |= (1ULL << which); else states &= ~(1ULL << which); - led_rf_active_on = - (states & (1ULL << BTS_STATUS_RF_ACTIVE)) && - !(states & (1ULL << BTS_STATUS_RF_MUTE)); - LOGP(DL1C, LOGL_INFO, - "Set global status #%d to %d (%04llx -> %04llx), LEDs: ACT %d\n", + "Set global status #%d to %d (%04llx -> %04llx)\n", which, on, - (long long)old_states, (long long)states, - led_rf_active_on); - - oc2gbts_led_set(led_rf_active_on ? LED_GREEN : LED_OFF); + (long long)old_states, (long long)states); } void bts_model_print_help() -- To view, visit https://gerrit.osmocom.org/14259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ifae634c6c2ecec7d32298c0f266f91f3e81308f5 Gerrit-Change-Number: 14259 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann <dwillmann at sysmocom.de> Gerrit-Reviewer: Daniel Willmann <dwillmann at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190531/d125435d/attachment.htm>