jolly has uploaded this change for review.
Indicate framing alignment error as alarm inidication signal
Change-Id: Iaad3adb6afb9e1d8a002fa4a04ba4ab8e51671a3
---
M src/usb.c
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/59/35559/1
diff --git a/src/usb.c b/src/usb.c
index fcffc12..950d0ae 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -33,6 +33,8 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/bit32gen.h>
#include <osmocom/usb/libusb.h>
+#include <osmocom/e1d/proto.h>
+#include <osmocom/e1d/proto_srv.h>
#include <libusb.h>
@@ -396,6 +398,13 @@
if ((errcnt->flags & ICE1USB_ERR_F_ALIGN_ERR) != (last->flags & ICE1USB_ERR_F_ALIGN_ERR)) {
LOGPLI(line, DE1D, LOGL_ERROR, "ALIGNMENT %s\n",
errcnt->flags & ICE1USB_ERR_F_ALIGN_ERR ? "LOST" : "REGAINED");
+ if ((errcnt->flags & ICE1USB_ERR_F_ALIGN_ERR)) {
+ osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_AIS_ON,
+ line->intf->id, line->id, 0, NULL, 0);
+ } else {
+ osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_AIS_OFF,
+ line->intf->id, line->id, 0, NULL, 0);
+ }
}
if ((errcnt->flags & ICE1USB_ERR_F_LOS) != (last->flags & ICE1USB_ERR_F_LOS)) {
To view, visit change 35559. To unsubscribe, or for help writing mail filters, visit settings.