diff options
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/dbus-adapter.c | 2 | ||||
-rw-r--r-- | hcid/dbus-hci.c | 16 | ||||
-rw-r--r-- | hcid/dbus-rfcomm.c | 2 | ||||
-rw-r--r-- | hcid/dbus-security.c | 2 | ||||
-rw-r--r-- | hcid/dbus-service.c | 6 | ||||
-rw-r--r-- | hcid/dbus-test.c | 10 | ||||
-rw-r--r-- | hcid/hcid.h | 3 | ||||
-rw-r--r-- | hcid/security.c | 2 |
8 files changed, 20 insertions, 23 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index 50a28a57..8699499a 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -539,7 +539,7 @@ static DBusHandlerResult adapter_set_discoverable_to(DBusConnection *conn, return DBUS_HANDLER_RESULT_NEED_MEMORY; if (adapter->timeout_id) { - g_timeout_remove(adapter->timeout_id); + g_source_remove(adapter->timeout_id); adapter->timeout_id = 0; } diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index 165eb142..25d6e01e 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -370,7 +370,7 @@ static void reply_pending_requests(const char *path, struct adapter *adapter) (name_cb_t) create_bond_req_exit, adapter); if (adapter->bonding->io_id) - g_io_remove_watch(adapter->bonding->io_id); + g_source_remove(adapter->bonding->io_id); g_io_channel_close(adapter->bonding->io); bonding_request_free(adapter->bonding); adapter->bonding = NULL; @@ -477,7 +477,7 @@ int unregister_adapter_path(const char *path) if (adapter->pending_dc) { error_no_such_adapter(adapter->pending_dc->conn, adapter->pending_dc->msg); - g_timeout_remove(adapter->pending_dc->timeout_id); + g_source_remove(adapter->pending_dc->timeout_id); dc_pending_timeout_cleanup(adapter); } @@ -739,7 +739,7 @@ int hcid_dbus_stop_device(uint16_t id) } /* cancel pending timeout */ if (adapter->timeout_id) { - g_timeout_remove(adapter->timeout_id); + g_source_remove(adapter->timeout_id); adapter->timeout_id = 0; } @@ -956,7 +956,7 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, (name_cb_t) create_bond_req_exit, adapter); if (adapter->bonding->io_id) - g_io_remove_watch(adapter->bonding->io_id); + g_source_remove(adapter->bonding->io_id); g_io_channel_close(adapter->bonding->io); bonding_request_free(adapter->bonding); adapter->bonding = NULL; @@ -1744,7 +1744,7 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, (name_cb_t) create_bond_req_exit, adapter); if (adapter->bonding->io_id) - g_io_remove_watch(adapter->bonding->io_id); + g_source_remove(adapter->bonding->io_id); g_io_channel_close(adapter->bonding->io); bonding_request_free(adapter->bonding); adapter->bonding = NULL; @@ -1760,7 +1760,7 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, else send_message_and_unref(adapter->pending_dc->conn, reply); - g_timeout_remove(adapter->pending_dc->timeout_id); + g_source_remove(adapter->pending_dc->timeout_id); dc_pending_timeout_cleanup(adapter); } @@ -1944,7 +1944,7 @@ void hcid_dbus_setscan_enable_complete(bdaddr_t *local) } if (adapter->timeout_id) { - g_timeout_remove(adapter->timeout_id); + g_source_remove(adapter->timeout_id); adapter->timeout_id = 0; } @@ -2036,7 +2036,7 @@ void create_bond_req_exit(const char *name, struct adapter *adapter) g_io_channel_close(adapter->bonding->io); if (adapter->bonding->io_id) - g_io_remove_watch(adapter->bonding->io_id); + g_source_remove(adapter->bonding->io_id); bonding_request_free(adapter->bonding); adapter->bonding = NULL; } diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c index 5a893898..515a55aa 100644 --- a/hcid/dbus-rfcomm.c +++ b/hcid/dbus-rfcomm.c @@ -102,7 +102,7 @@ static void rfcomm_node_free(struct rfcomm_node *node) if (node->owner) free(node->owner); if (node->io) { - g_io_remove_watch(node->io_id); + g_source_remove(node->io_id); g_io_channel_unref(node->io); } if (node->conn) diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c index 98ca1df5..0a283124 100644 --- a/hcid/dbus-security.c +++ b/hcid/dbus-security.c @@ -74,7 +74,7 @@ static void passkey_agent_free(struct passkey_agent *agent) } if (agent->timeout) - g_timeout_remove(agent->timeout); + g_source_remove(agent->timeout); if (!agent->exited) release_agent(agent); diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index ac3e4cc8..e1be0797 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -293,7 +293,7 @@ static DBusHandlerResult service_filter(DBusConnection *conn, } if (service->startup_timer) { - g_timeout_remove(service->startup_timer); + g_source_remove(service->startup_timer); service->startup_timer = 0; } else debug("service_filter: timeout was already removed!"); @@ -322,7 +322,7 @@ static void abort_startup(struct service *service, DBusConnection *conn, int eco dbus_connection_remove_filter(get_dbus_connection(), service_filter, service); - g_timeout_remove(service->startup_timer); + g_source_remove(service->startup_timer); service->startup_timer = 0; if (service->action) { @@ -350,7 +350,7 @@ static void service_died(GPid pid, gint status, gpointer data) abort_startup(service, get_dbus_connection(), ECANCELED); if (service->shutdown_timer) { - g_timeout_remove(service->shutdown_timer); + g_source_remove(service->shutdown_timer); service->shutdown_timer = 0; } diff --git a/hcid/dbus-test.c b/hcid/dbus-test.c index 1085d5c8..78766a49 100644 --- a/hcid/dbus-test.c +++ b/hcid/dbus-test.c @@ -156,7 +156,7 @@ static void audit_requestor_exited(const char *name, struct audit *audit) g_io_channel_close(audit->io); } if (audit->timeout) - g_timeout_remove(audit->timeout); + g_source_remove(audit->timeout); audit_free(audit); } @@ -282,7 +282,7 @@ static gboolean l2raw_data_callback(GIOChannel *io, GIOCondition cond, struct au return TRUE; if (audit->timeout) { - g_timeout_remove(audit->timeout); + g_source_remove(audit->timeout); audit->timeout = 0; } @@ -311,7 +311,7 @@ static gboolean l2raw_data_callback(GIOChannel *io, GIOCondition cond, struct au return TRUE; if (audit->timeout) { - g_timeout_remove(audit->timeout); + g_source_remove(audit->timeout); audit->timeout = 0; } @@ -325,7 +325,7 @@ static gboolean l2raw_data_callback(GIOChannel *io, GIOCondition cond, struct au failed: if (audit->timeout) { - g_timeout_remove(audit->timeout); + g_source_remove(audit->timeout); audit->timeout = 0; } @@ -546,7 +546,7 @@ static DBusHandlerResult cancel_audit_remote_device(DBusConnection *conn, g_io_channel_close(audit->io); } if (audit->timeout) - g_timeout_remove(audit->timeout); + g_source_remove(audit->timeout); audits = g_slist_remove(audits, audit); name_listener_remove(audit->conn, audit->requestor, diff --git a/hcid/hcid.h b/hcid/hcid.h index f8d58fc4..91b311f8 100644 --- a/hcid/hcid.h +++ b/hcid/hcid.h @@ -23,9 +23,6 @@ * */ -#define g_io_remove_watch g_source_remove -#define g_timeout_remove g_source_remove - #include <time.h> #include <sys/types.h> diff --git a/hcid/security.c b/hcid/security.c index ca984852..e14b98e9 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -882,7 +882,7 @@ void stop_security_manager(int hdev) info("Stopping security manager %d", hdev); - g_io_remove_watch(io_data[hdev].watch_id); + g_source_remove(io_data[hdev].watch_id); g_io_channel_unref(io_data[hdev].channel); io_data[hdev].watch_id = -1; io_data[hdev].channel = NULL; |