diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-04-20 15:41:32 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-04-20 15:41:32 +0000 |
commit | 36d0506a28a2413467d2c5e793d53c45b2183d34 (patch) | |
tree | e4673ea0514fe496ae288f5b9c5b52f81b147dba /network/connection.c | |
parent | f5dcb96ae5e257efc4dc9cdd510119e9788d1228 (diff) |
Check connection busy before removing it.
Diffstat (limited to 'network/connection.c')
-rw-r--r-- | network/connection.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/network/connection.c b/network/connection.c index c31c423a..e3b85929 100644 --- a/network/connection.c +++ b/network/connection.c @@ -698,3 +698,14 @@ int connection_find_data(DBusConnection *conn, return -1; } + +gboolean connection_has_pending(DBusConnection *conn, const char *path) +{ + struct network_conn *nc; + + if (!dbus_connection_get_object_path_data(conn, path, (void *) &nc)) + return FALSE; + + return (nc->state == CONNECTING); +} + |