diff --git a/emulator/bthost.c b/emulator/bthost.c
index 92c63cd..2d94d19 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
struct cid_hook *next;
};
-struct rfcomm_channel_hook {
+struct rfcomm_chan_hook {
uint8_t channel;
- bthost_rfcomm_channel_hook_func_t func;
+ bthost_rfcomm_chan_hook_func_t func;
void *user_data;
- struct rfcomm_channel_hook *next;
+ struct rfcomm_chan_hook *next;
};
struct btconn {
struct l2conn *l2conns;
struct rcconn *rcconns;
struct cid_hook *cid_hooks;
- struct rfcomm_channel_hook *rfcomm_channel_hooks;
+ struct rfcomm_chan_hook *rfcomm_chan_hooks;
struct btconn *next;
void *smp_data;
};
free(rcconn);
}
- while (conn->rfcomm_channel_hooks) {
- struct rfcomm_channel_hook *hook = conn->rfcomm_channel_hooks;
+ while (conn->rfcomm_chan_hooks) {
+ struct rfcomm_chan_hook *hook = conn->rfcomm_chan_hooks;
- conn->rfcomm_channel_hooks = hook->next;
+ conn->rfcomm_chan_hooks = hook->next;
free(hook);
}
return NULL;
}
-static struct rfcomm_channel_hook *find_rfcomm_channel_hook(struct btconn *conn,
+static struct rfcomm_chan_hook *find_rfcomm_chan_hook(struct btconn *conn,
uint16_t channel)
{
- struct rfcomm_channel_hook *hook;
+ struct rfcomm_chan_hook *hook;
- for (hook = conn->rfcomm_channel_hooks; hook != NULL; hook = hook->next)
+ for (hook = conn->rfcomm_chan_hooks; hook != NULL; hook = hook->next)
if (hook->channel == channel)
return hook;
p = data + hdr_len;
if (RFCOMM_GET_DLCI(hdr->address)) {
- struct rfcomm_channel_hook *hook;
+ struct rfcomm_chan_hook *hook;
- hook = find_rfcomm_channel_hook(conn,
+ hook = find_rfcomm_chan_hook(conn,
RFCOMM_GET_CHANNEL(hdr->address));
if (!hook)
return;
&req, sizeof(req), NULL, NULL);
}
-void bthost_add_rfcomm_channel_hook(struct bthost *bthost, uint16_t handle,
+void bthost_add_rfcomm_chan_hook(struct bthost *bthost, uint16_t handle,
uint8_t channel,
- bthost_rfcomm_channel_hook_func_t func,
+ bthost_rfcomm_chan_hook_func_t func,
void *user_data)
{
- struct rfcomm_channel_hook *hook;
+ struct rfcomm_chan_hook *hook;
struct btconn *conn;
conn = bthost_find_conn(bthost, handle);
hook->func = func;
hook->user_data = user_data;
- hook->next = conn->rfcomm_channel_hooks;
- conn->rfcomm_channel_hooks = hook;
+ hook->next = conn->rfcomm_chan_hooks;
+ conn->rfcomm_chan_hooks = hook;
}
void bthost_send_rfcomm_data(struct bthost *bthost, uint16_t handle,
diff --git a/emulator/bthost.h b/emulator/bthost.h
index 0d4594f..5048094 100644
--- a/emulator/bthost.h
+++ b/emulator/bthost.h
uint8_t channel, bthost_rfcomm_connect_cb func,
void *user_data);
-typedef void (*bthost_rfcomm_channel_hook_func_t) (const void *data,
- uint16_t len,
+typedef void (*bthost_rfcomm_chan_hook_func_t) (const void *data, uint16_t len,
void *user_data);
-void bthost_add_rfcomm_channel_hook(struct bthost *bthost, uint16_t handle,
+void bthost_add_rfcomm_chan_hook(struct bthost *bthost, uint16_t handle,
uint8_t channel,
- bthost_rfcomm_channel_hook_func_t func,
+ bthost_rfcomm_chan_hook_func_t func,
void *user_data);
void bthost_send_rfcomm_data(struct bthost *bthost, uint16_t handle,
diff --git a/tools/rfcomm-tester.c b/tools/rfcomm-tester.c
index e8fbe1d..8be6e72 100644
--- a/tools/rfcomm-tester.c
+++ b/tools/rfcomm-tester.c
struct bthost *bthost = hciemu_client_get_host(data->hciemu);
if (client_data->send_data)
- bthost_add_rfcomm_channel_hook(bthost, handle,
+ bthost_add_rfcomm_chan_hook(bthost, handle,
client_data->client_channel,
client_hook_func, NULL);
else if (client_data->read_data)
struct bthost *bthost;
bthost = hciemu_client_get_host(data->hciemu);
- bthost_add_rfcomm_channel_hook(bthost, handle,
+ bthost_add_rfcomm_chan_hook(bthost, handle,
server_data->client_channel,
server_hook_func, NULL);
bthost_connect_rfcomm(bthost, handle, server_data->client_channel,