summaryrefslogtreecommitdiff
path: root/src/libgsmd
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-01-12 23:34:15 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-01-12 23:34:15 +0000
commit496d202f517dbecc1be4e1afc6782c0e3dc48373 (patch)
tree3f90b37d1a17ce84651575340cac8d0f3febd30b /src/libgsmd
parent90697802f0a6009b67ab4bf12245c92645ce7728 (diff)
only call event handler if it is actually present
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@543 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/libgsmd')
-rw-r--r--src/libgsmd/libgsmd_event.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libgsmd/libgsmd_event.c b/src/libgsmd/libgsmd_event.c
index 6e19eff..d2f00cd 100644
--- a/src/libgsmd/libgsmd_event.c
+++ b/src/libgsmd/libgsmd_event.c
@@ -43,7 +43,10 @@ static int evt_demux_msghandler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh
gmh->msg_subtype >= __NUM_GSMD_EVT)
return -EINVAL;
- return evt_handlers[gmh->msg_subtype](lh, gmh->msg_subtype, aux);
+ if (evt_handlers[gmh->msg_subtype])
+ return evt_handlers[gmh->msg_subtype](lh, gmh->msg_subtype, aux);
+ else
+ return 0;
}
int lgsm_evt_init(struct lgsm_handle *lh)
personal git repositories of Harald Welte. Your mileage may vary