summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util/event.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/event.c b/src/util/event.c
index de1da99..f086d84 100644
--- a/src/util/event.c
+++ b/src/util/event.c
@@ -253,6 +253,14 @@ static int error_handler(struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdat
return 0;
}
+static int cinfo_handler(struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)
+{
+ printf("EVENT: Cell Info: %03u-%03u-%04x-%04x @ %04u (%02u)\n",
+ aux->u.cell_info.mcc, aux->u.cell_info.mnc, aux->u.cell_info.lac,
+ aux->u.cell_info.ci, aux->u.cell_info.arfcn, aux->u.cell_info.rxlev);
+ return 0;
+}
+
int event_init(struct lgsm_handle *lh)
{
int rc;
@@ -268,6 +276,7 @@ int event_init(struct lgsm_handle *lh)
rc |= lgsm_evt_handler_register(lh, GSMD_EVT_OUT_STATUS, &cprog_handler);
rc |= lgsm_evt_handler_register(lh, GSMD_EVT_IN_ERROR, &error_handler);
rc |= lgsm_evt_handler_register(lh, GSMD_EVT_CALL_WAIT, &ccwa_handler);
+ rc |= lgsm_evt_handler_register(lh, GSMD_EVT_CELLINFO, &cinfo_handler);
return rc;
}
personal git repositories of Harald Welte. Your mileage may vary