summaryrefslogtreecommitdiff
path: root/src/libgsmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgsmd')
-rw-r--r--src/libgsmd/libgsmd.c6
-rw-r--r--src/libgsmd/libgsmd_network.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/libgsmd/libgsmd.c b/src/libgsmd/libgsmd.c
index 7f936e8..8dde4b6 100644
--- a/src/libgsmd/libgsmd.c
+++ b/src/libgsmd/libgsmd.c
@@ -82,9 +82,11 @@ int lgsm_handle_packet(struct lgsm_handle *lh, char *buf, int len)
handler = lh->handler[gmh->msg_type];
if (handler)
- handler(lh, gmh);
- else
+ return handler(lh, gmh);
+ else {
fprintf(stderr, "unable to handle packet type=%u\n", gmh->msg_type);
+ return 0;
+ }
}
int lgsm_register_handler(struct lgsm_handle *lh, int type, lgsm_msg_handler *handler)
diff --git a/src/libgsmd/libgsmd_network.c b/src/libgsmd/libgsmd_network.c
index ae104b8..73bc895 100644
--- a/src/libgsmd/libgsmd_network.c
+++ b/src/libgsmd/libgsmd_network.c
@@ -16,3 +16,7 @@ int lgsm_netreg_register(struct lgsm_handle *lh, int oper)
return lgsm_send_simple(lh, GSMD_MSG_NETWORK, GSMD_NETWORK_REGISTER);
}
+int lgsm_signal_quality(struct lgsm_handle *lh)
+{
+ return lgsm_send_simple(lh, GSMD_MSG_NETWORK, GSMD_NETWORK_SIGQ_GET);
+}
personal git repositories of Harald Welte. Your mileage may vary