diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-08-16 14:41:32 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-08-16 14:41:32 +0200 |
commit | 95e5decb7991d8934272ae9d941d575515362291 (patch) | |
tree | dc9570ed87779e1f28c9cb0ea3de5f1b6ea1af18 | |
parent | dd0c2ef7f345ed0390f42c5bd1c12ad315b67a19 (diff) |
DAHDI: Actually increment e1_input related rate counters
-rw-r--r-- | src/input/dahdi.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/input/dahdi.c b/src/input/dahdi.c index 0eac0ab..c7ce6d2 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -38,6 +38,7 @@ #include <osmocom/core/msgb.h> #include <osmocom/core/logging.h> #include <osmocom/core/signal.h> +#include <osmocom/core/rate_ctr.h> #include <osmocom/abis/subchan_demux.h> #include <osmocom/abis/e1_input.h> #include <osmocom/core/talloc.h> @@ -61,6 +62,7 @@ static const struct value_string dahdi_evt_names[] = { static void handle_dahdi_exception(struct e1inp_ts *ts) { int rc, evt; + struct e1inp_line *line = ts->line; struct input_signal_data isd; rc = ioctl(ts->driver.dahdi.fd.fd, DAHDI_GETEVENT, &evt); @@ -77,11 +79,24 @@ static void handle_dahdi_exception(struct e1inp_ts *ts) case DAHDI_EVENT_ALARM: /* we should notify the code that the line is gone */ osmo_signal_dispatch(SS_L_INPUT, S_INP_LINE_ALARM, &isd); + rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_ALARM]); break; case DAHDI_EVENT_NOALARM: /* alarm has gone, we should re-start the SABM requests */ osmo_signal_dispatch(SS_L_INPUT, S_INP_LINE_NOALARM, &isd); break; + case DAHDI_EVENT_ABORT: + rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_HDLC_ABORT]); + break; + case DAHDI_EVENT_OVERRUN: + rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_HDLC_OVERR]); + break; + case DAHDI_EVENT_BADFCS: + rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_HDLC_BADFCS]); + break; + case DAHDI_EVENT_REMOVED: + rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_REMOVED]); + break; } } |