diff options
author | Ulisses Furquim <ulissesf@gmail.com> | 2006-09-04 21:12:49 +0000 |
---|---|---|
committer | Ulisses Furquim <ulissesf@gmail.com> | 2006-09-04 21:12:49 +0000 |
commit | 920a9decba9018b960b0a22f60d1f60d7ed6267b (patch) | |
tree | 7a4a42cc3b037e2eedf81337bac23a76df06e48a | |
parent | ee054b5500ecbb56672e1c2674167b295d489c2c (diff) |
Remove usage of sdp_is_connected()
-rw-r--r-- | hcid/dbus-sdp.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c index bf60d7fa..fbf8ac2b 100644 --- a/hcid/dbus-sdp.c +++ b/hcid/dbus-sdp.c @@ -444,7 +444,6 @@ static gboolean search_process_cb(GIOChannel *chan, GIOCondition cond, void *uda int sk, err = 0; socklen_t len; const char *dst; - int retval = FALSE; dbus_message_get_args(ctxt->rq, NULL, DBUS_TYPE_STRING, &dst, @@ -470,7 +469,7 @@ static gboolean search_process_cb(GIOChannel *chan, GIOCondition cond, void *uda fail: g_io_channel_unref(chan); - return retval; + return FALSE; } static void remote_svc_rec_completed_cb(uint8_t type, uint16_t err, uint8_t *rsp, size_t size, void *udata) @@ -782,9 +781,9 @@ static gboolean sdp_client_connect_cb(GIOChannel *chan, GIOCondition cond, void fail: if (err) error_connection_attempt_failed(c->conn, c->rq, err); - if (ctxt) transaction_context_free(ctxt); + g_io_channel_unref(chan); done: pending_connects = slist_remove(pending_connects, c); pending_connect_free(c); @@ -819,14 +818,9 @@ static int connect_request(DBusConnection *conn, DBusMessage *msg, return -1; } - chan = g_io_channel_unix_new(c->session->sock); + chan = g_io_channel_unix_new(sdp_get_socket(c->session)); g_io_channel_set_close_on_unref(chan, TRUE); - if (sdp_is_connected(c->session)) { - sdp_client_connect_cb(chan, G_IO_OUT, c); - return 0; - } - g_io_add_watch(chan, G_IO_OUT, sdp_client_connect_cb, c); pending_connects = slist_append(pending_connects, c); |