Re: [PATCH 3/9] Battery: Discover Characteristic Descriptors
From: Chen Ganir <hidden>
Date: 2012-07-24 10:13:56
On 07/23/2012 11:08 PM, Claudio Takahasi wrote:
Hi Chen Ganir: On Tue, Jul 17, 2012 at 10:59 AM, Chen Ganir [off-list ref] wrote:quoted
Discover all characteristic descriptors, and build a descriptor list --- profiles/batterystate/batterystate.c | 70 ++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+)diff --git a/profiles/batterystate/batterystate.c b/profiles/batterystate/batterystate.c index 40663f6..18045ed 100644 --- a/profiles/batterystate/batterystate.c +++ b/profiles/batterystate/batterystate.c@@ -50,8 +50,24 @@ static GSList *servers; struct characteristic { struct gatt_char attr; /* Characteristic */ struct battery *batt; /* Parent Battery Service */ + GSList *desc; /* Descriptors */ }; +struct descriptor { + struct characteristic *ch; /* Parent Characteristic */ + uint16_t handle; /* Descriptor Handle */ + bt_uuid_t uuid; /* UUID */ +}; + +static void char_free(gpointer user_data) +{ + struct characteristic *c = user_data; + + g_slist_free_full(c->desc, g_free); + + g_free(c); +}Please fix the following warning: profiles/batterystate/batterystate.c:62:13: error: 'char_free' defined but not used [-Werror=unused-function] cc1: all warnings being treated as errors
I'll do that. Anything else for this patch set ?
BR, Claudio
Thanks, Chen Ganir. -- *Chen Ganir***| Texas Instruments | *SW Engineer* Mobile Connectivity Solutions| Direct: (972)-9-7906080 | Mobile: (972)-52-2438-406|Zarhin 26,Ra'anana, Israel |http://www.ti.com <http://www.ti.com/> | chen.ganir@ti.com <mailto:chen.ganir@ti.com>