From 8cfab5328ce9b297724eeeaa5f79cec58cd4cc98 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 3 Aug 2011 14:26:23 +0200 Subject: huawei: Fix race condition with enable polling --- plugins/huawei.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/huawei.c') diff --git a/plugins/huawei.c b/plugins/huawei.c index 8afc0f58..c57cbb42 100644 --- a/plugins/huawei.c +++ b/plugins/huawei.c @@ -104,6 +104,10 @@ static void huawei_remove(struct ofono_modem *modem) ofono_modem_set_data(modem, NULL); + /* Cleanup after potential enable polling */ + if (data->sysinfo_poll_source > 0) + g_source_remove(data->sysinfo_poll_source); + /* Cleanup after hot-unplug */ g_at_chat_unref(data->pcui); -- cgit v1.2.3