summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/event.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/event.c b/src/util/event.c
index f086d84..ae5ca7b 100644
--- a/src/util/event.c
+++ b/src/util/event.c
@@ -261,6 +261,12 @@ static int cinfo_handler(struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdat
return 0;
}
+static int gps_handler(struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)
+{
+ printf("EVENT: %s: %s\n", evt == GSMD_EVT_GPS ? "GPS" : "AIS", aux->data);
+ return 0;
+}
+
int event_init(struct lgsm_handle *lh)
{
int rc;
@@ -277,6 +283,8 @@ int event_init(struct lgsm_handle *lh)
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);
+ rc |= lgsm_evt_handler_register(lh, GSMD_EVT_GPS, &gps_handler);
+ rc |= lgsm_evt_handler_register(lh, GSMD_EVT_AIS, &gps_handler);
return rc;
}
personal git repositories of Harald Welte. Your mileage may vary