OSDN Git Service

emulator/bthost: Rename rfcomm_channel to rfcomm_chan for shorter symbol names
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 19 Feb 2014 13:09:34 +0000 (15:09 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 19 Feb 2014 13:09:34 +0000 (15:09 +0200)
emulator/bthost.c
emulator/bthost.h
tools/rfcomm-tester.c

index 92c63cd..2d94d19 100644 (file)
@@ -126,11 +126,11 @@ struct cid_hook {
        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 {
@@ -142,7 +142,7 @@ 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;
 };
@@ -255,10 +255,10 @@ static void btconn_free(struct btconn *conn)
                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);
        }
 
@@ -1611,12 +1611,12 @@ static struct cid_hook *find_cid_hook(struct btconn *conn, uint16_t cid)
        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;
 
@@ -1892,9 +1892,9 @@ static void rfcomm_uih_recv(struct bthost *bthost, struct btconn *conn,
        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;
@@ -2201,12 +2201,12 @@ bool bthost_connect_rfcomm(struct bthost *bthost, uint16_t handle,
                                        &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);
@@ -2223,8 +2223,8 @@ void bthost_add_rfcomm_channel_hook(struct bthost *bthost, uint16_t 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,
index 0d4594f..5048094 100644 (file)
@@ -99,13 +99,12 @@ bool bthost_connect_rfcomm(struct bthost *bthost, uint16_t handle,
                                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,
index e8fbe1d..8be6e72 100644 (file)
@@ -525,7 +525,7 @@ static void rfcomm_connect_cb(uint16_t handle, uint16_t cid,
        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)
@@ -670,7 +670,7 @@ static void client_new_conn(uint16_t handle, void *user_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,