Skip to content

Commit

Permalink
mwi: use new bevent API
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 authored and sreimers committed Aug 15, 2024
1 parent 192c184 commit 1501ad3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions modules/mwi/mwi.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,10 @@ static struct mwi *mwi_find(const struct ua *ua)
}


static void ua_event_handler(struct ua *ua, enum ua_event ev,
struct call *call, const char *prm, void *arg)
static void event_handler(enum ua_event ev, struct bevent *event, void *arg)
{
struct ua *ua = bevent_get_ua(event);
const struct account *acc = ua_account(ua);
(void)call;
(void)prm;
(void)arg;

if (ev == UA_EVENT_REGISTER_OK) {
Expand Down Expand Up @@ -195,13 +193,13 @@ static int module_init(void)
list_init(&mwil);
tmr_start(&tmr, 1, tmr_handler, 0);

return uag_event_register(ua_event_handler, NULL);
return bevent_register(event_handler, NULL);
}


static int module_close(void)
{
uag_event_unregister(ua_event_handler);
bevent_unregister(event_handler);
tmr_cancel(&tmr);
list_flush(&mwil);

Expand Down

0 comments on commit 1501ad3

Please sign in to comment.