avrcp.c (141dff406aaab39eb9a68c877679b2701a6a14be) | avrcp.c (d3a84258a9558f5d0bd9135524ad3861acdf58e5) |
---|---|
1/* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 554 unchanged lines hidden (view full) --- 563 // setup default unit / subunit info 564 connection->company_id = 0xffffff; 565 connection->target_unit_type = AVRCP_SUBUNIT_TYPE_PANEL; 566 connection->target_subunit_info_data_size = sizeof(avrcp_default_subunit_info); 567 connection->target_subunit_info_data = avrcp_default_subunit_info; 568 569 log_info("avrcp_create_connection, role %d", role); 570 (void)memcpy(connection->remote_addr, remote_addr, 6); | 1/* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 554 unchanged lines hidden (view full) --- 563 // setup default unit / subunit info 564 connection->company_id = 0xffffff; 565 connection->target_unit_type = AVRCP_SUBUNIT_TYPE_PANEL; 566 connection->target_subunit_info_data_size = sizeof(avrcp_default_subunit_info); 567 connection->target_subunit_info_data = avrcp_default_subunit_info; 568 569 log_info("avrcp_create_connection, role %d", role); 570 (void)memcpy(connection->remote_addr, remote_addr, 6); |
571 btstack_linked_list_add(&avrcp_connections, (btstack_linked_item_t *) connection); | 571 btstack_linked_list_add_tail(&avrcp_connections, (btstack_linked_item_t *) connection); |
572 return connection; 573} 574 575static void avrcp_finalize_connection(avrcp_connection_t * connection){ 576 btstack_run_loop_remove_timer(&connection->retry_timer); 577 btstack_run_loop_remove_timer(&connection->controller_press_and_hold_cmd_timer); 578 btstack_linked_list_remove(&avrcp_connections, (btstack_linked_item_t*) connection); 579 btstack_memory_avrcp_connection_free(connection); --- 704 unchanged lines hidden --- | 572 return connection; 573} 574 575static void avrcp_finalize_connection(avrcp_connection_t * connection){ 576 btstack_run_loop_remove_timer(&connection->retry_timer); 577 btstack_run_loop_remove_timer(&connection->controller_press_and_hold_cmd_timer); 578 btstack_linked_list_remove(&avrcp_connections, (btstack_linked_item_t*) connection); 579 btstack_memory_avrcp_connection_free(connection); --- 704 unchanged lines hidden --- |