diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2014-10-02 10:11:01 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-10-02 14:20:50 +0300 |
commit | 88adaba587bc53c795a2bebab95058f804412ab4 (patch) | |
tree | 20d3befef50efbcb82e50a1a381929d022bc140d /android/tester-hdp.c | |
parent | a75a5815ea4dfd6bc1564a9ca722a25383388fb1 (diff) | |
download | bluez-88adaba587bc53c795a2bebab95058f804412ab4.tar.gz |
android/tester: Use generic connect callback for simple cases
This is usefull when no custom behavior and just simple pdu exchange
is needed.
Diffstat (limited to 'android/tester-hdp.c')
-rw-r--r-- | android/tester-hdp.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/android/tester-hdp.c b/android/tester-hdp.c index e9c0c1d22..ab7666d41 100644 --- a/android/tester-hdp.c +++ b/android/tester-hdp.c @@ -243,16 +243,6 @@ static void hdp_unregister_app_action(void) schedule_action_verification(step); } -static void hdp_sdp_search_cb(uint16_t handle, uint16_t cid, void *user_data) -{ - struct emu_l2cap_cid_data *cid_data = user_data; - - cid_data->handle = handle; - cid_data->cid = cid; - - tester_handle_l2cap_data_exchange(cid_data); -} - static void mcap_ctrl_cid_hook_cb(const void *data, uint16_t len, void *user_data) { @@ -315,28 +305,10 @@ static void mcap_ctrl_connect_cb(uint16_t handle, uint16_t cid, void *user_data) cid_data); } -static void mcap_data_cid_hook_cb(const void *data, uint16_t len, - void *user_data) -{ -} - -static void mcap_data_connect_cb(uint16_t handle, uint16_t cid, void *user_data) -{ - struct test_data *data = tester_get_data(); - struct bthost *bthost = hciemu_client_get_host(data->hciemu); - struct emu_l2cap_cid_data *cid_data = user_data; - - cid_data->handle = handle; - cid_data->cid = cid; - - bthost_add_cid_hook(bthost, handle, cid, mcap_data_cid_hook_cb, - cid_data); -} - /* Emulate SDP (PSM = 1) */ static struct emu_set_l2cap_data l2cap_setup_sdp_data = { .psm = 1, - .func = hdp_sdp_search_cb, + .func = tester_generic_connect_cb, .user_data = &sdp_cid_data, }; @@ -350,7 +322,7 @@ static struct emu_set_l2cap_data l2cap_setup_cc_data = { /* Emulate Data Channel (PSM = 0x1003) */ static struct emu_set_l2cap_data l2cap_setup_dc_data = { .psm = 0x1003, - .func = mcap_data_connect_cb, + .func = tester_generic_connect_cb, .user_data = &data_cid_data, }; |