diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-01-12 23:34:15 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-01-12 23:34:15 +0000 |
commit | 496d202f517dbecc1be4e1afc6782c0e3dc48373 (patch) | |
tree | 3f90b37d1a17ce84651575340cac8d0f3febd30b /src | |
parent | 90697802f0a6009b67ab4bf12245c92645ce7728 (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')
-rw-r--r-- | src/libgsmd/libgsmd_event.c | 5 |
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) |