From 60aceb3e7180a3f2376b5a71c6c31b9cace40812 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 22 Nov 2010 04:29:06 -0600 Subject: [PATCH] modem: Miscellaneous style fixes --- src/modem.c | 11 +++++++---- src/ofono.h | 9 ++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/modem.c b/src/modem.c index 67557859..e519f40e 100644 --- a/src/modem.c +++ b/src/modem.c @@ -421,12 +421,14 @@ static void modem_change_state(struct ofono_modem *modem, __ofono_history_probe_drivers(modem); __ofono_nettime_probe_drivers(modem); } + notify_online_watches(modem); break; case MODEM_STATE_ONLINE: if (driver->post_online) driver->post_online(modem); + notify_online_watches(modem); break; } @@ -456,9 +458,9 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *user) } } -unsigned __ofono_modem_add_online_watch(struct ofono_modem *modem, - ofono_modem_online_notify_func notify, - void *data, ofono_destroy_func destroy) +unsigned int __ofono_modem_add_online_watch(struct ofono_modem *modem, + ofono_modem_online_notify_func notify, + void *data, ofono_destroy_func destroy) { struct ofono_watchlist_item *item; @@ -474,7 +476,8 @@ unsigned __ofono_modem_add_online_watch(struct ofono_modem *modem, return __ofono_watchlist_add_item(modem->online_watches, item); } -void __ofono_modem_remove_online_watch(struct ofono_modem *modem, unsigned id) +void __ofono_modem_remove_online_watch(struct ofono_modem *modem, + unsigned int id) { __ofono_watchlist_remove_item(modem->online_watches, id); } diff --git a/src/ofono.h b/src/ofono.h index 566dacb1..f12ff566 100644 --- a/src/ofono.h +++ b/src/ofono.h @@ -177,13 +177,12 @@ unsigned int __ofono_modemwatch_add(ofono_modemwatch_cb_t cb, void *user, ofono_destroy_func destroy); gboolean __ofono_modemwatch_remove(unsigned int id); -typedef void (*ofono_modem_online_notify_func)(ofono_bool_t online, - void *data); +typedef void (*ofono_modem_online_notify_func)(ofono_bool_t online, void *data); unsigned int __ofono_modem_add_online_watch(struct ofono_modem *modem, - ofono_modem_online_notify_func notify, - void *data, ofono_destroy_func destroy); + ofono_modem_online_notify_func notify, + void *data, ofono_destroy_func destroy); void __ofono_modem_remove_online_watch(struct ofono_modem *modem, - unsigned int id); + unsigned int id); #include