wimax: notify listeners of new wimax devices

If wimaxd gets started after NetworkManager, we need to notify
NetworkManager that the daemon has found and set up any wimax
interface it finds.  Most of the code for this was there but
not previously hooked up.
This commit is contained in:
Dan Williams 2011-01-05 15:13:04 -06:00
parent 1ec327130a
commit bee33b9a26

View file

@ -160,6 +160,19 @@ void iwmx_sdk_new_callback_unregister(WimaxNewWmxsdkFunc callback, void *user_da
g_static_mutex_unlock (&new_callbacks_mutex);
}
static void iwmx_sdk_call_new_callbacks(struct wmxsdk *wmxsdk)
{
GSList *iter;
g_static_mutex_lock (&new_callbacks_mutex);
for (iter = new_callbacks; iter; iter = g_slist_next (iter)) {
NewSdkCallback *cb = iter->data;
cb->callback (wmxsdk, cb->user_data);
}
g_static_mutex_unlock (&new_callbacks_mutex);
}
/****************************************************************/
typedef struct {
@ -1237,6 +1250,9 @@ static void iwmx_sdk_dev_add(unsigned idx, unsigned api_idx, const char *name)
}
g_iwmx_sdk_devs[idx] = wmxsdk;
/* Notify listeners of new devices */
iwmx_sdk_call_new_callbacks (wmxsdk);
return;
error_setup: