• Home
  • Raw
  • Download

Lines Matching refs:peer

75 	struct network_peer *peer;  member
89 struct network_peer *peer = list->data; in find_peer() local
91 if (!strcmp(peer->path, path)) in find_peer()
92 return peer; in find_peer()
118 emit_property_changed(connection, nc->peer->path, in bnep_watchdog_cb()
121 emit_property_changed(connection, nc->peer->path, in bnep_watchdog_cb()
124 emit_property_changed(connection, nc->peer->path, in bnep_watchdog_cb()
127 device_remove_disconnect_watch(nc->peer->device, nc->dc_id); in bnep_watchdog_cb()
172 bnep_kill_connection(&nc->peer->dst); in connection_destroy()
182 info("Network: disconnect %s", nc->peer->path); in disconnect_cb()
263 emit_property_changed(connection, nc->peer->path, in bnep_setup_cb()
266 emit_property_changed(connection, nc->peer->path, in bnep_setup_cb()
269 emit_property_changed(connection, nc->peer->path, in bnep_setup_cb()
274 nc->dc_id = device_add_disconnect_watch(nc->peer->device, disconnect_cb, in bnep_setup_cb()
353 struct network_peer *peer = data; in connection_connect() local
364 nc = find_connection(peer->connections, id); in connection_connect()
373 BT_IO_OPT_SOURCE_BDADDR, &peer->src, in connection_connect()
374 BT_IO_OPT_DEST_BDADDR, &peer->dst, in connection_connect()
415 struct network_peer *peer = data; in connection_disconnect() local
418 for (l = peer->connections; l; l = l->next) { in connection_disconnect()
433 struct network_peer *peer = data; in connection_get_properties() local
454 for (l = peer->connections; l; l = l->next) { in connection_get_properties()
483 device_remove_disconnect_watch(nc->peer->device, nc->dc_id); in connection_free()
491 static void peer_free(struct network_peer *peer) in peer_free() argument
493 g_slist_foreach(peer->connections, (GFunc) connection_free, NULL); in peer_free()
494 g_slist_free(peer->connections); in peer_free()
495 btd_device_unref(peer->device); in peer_free()
496 g_free(peer->path); in peer_free()
497 g_free(peer); in peer_free()
502 struct network_peer *peer = data; in path_unregister() local
505 NETWORK_PEER_INTERFACE, peer->path); in path_unregister()
507 peers = g_slist_remove(peers, peer); in path_unregister()
508 peer_free(peer); in path_unregister()
526 struct network_peer *peer; in connection_unregister() local
529 peer = find_peer(peers, path); in connection_unregister()
530 if (!peer) in connection_unregister()
533 nc = find_connection(peer->connections, id); in connection_unregister()
537 peer->connections = g_slist_remove(peer->connections, nc); in connection_unregister()
539 if (peer->connections) in connection_unregister()
549 struct network_peer *peer; in create_peer() local
551 peer = g_new0(struct network_peer, 1); in create_peer()
552 peer->device = btd_device_ref(device); in create_peer()
553 peer->path = g_strdup(path); in create_peer()
554 bacpy(&peer->src, src); in create_peer()
555 bacpy(&peer->dst, dst); in create_peer()
561 peer, path_unregister) == FALSE) { in create_peer()
564 peer_free(peer); in create_peer()
571 return peer; in create_peer()
577 struct network_peer *peer; in connection_register() local
583 peer = find_peer(peers, path); in connection_register()
584 if (!peer) { in connection_register()
585 peer = create_peer(device, path, src, dst); in connection_register()
586 if (!peer) in connection_register()
588 peers = g_slist_append(peers, peer); in connection_register()
591 nc = find_connection(peer->connections, id); in connection_register()
600 nc->peer = peer; in connection_register()
602 peer->connections = g_slist_append(peer->connections, nc); in connection_register()