On 07/23/2012 11:08 PM, Claudio Takahasi wrote:
Hi Chen Ganir:
On Tue, Jul 17, 2012 at 10:59 AM, Chen Ganir <chen.ganir@xxxxxx> wrote:
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@xxxxxx <mailto:chen.ganir@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html