From 496d202f517dbecc1be4e1afc6782c0e3dc48373 Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 12 Jan 2007 23:34:15 +0000 Subject: 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 --- src/libgsmd/libgsmd_event.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3