Thread (17 messages) 17 messages, 2 authors, 2012-09-20

Re: [PATCH v3 09/10] battery: Add support for notifications

flat view

From: Anderson Lizardo <hidden>
Date: 2012-09-20 10:54:44

Hi Chen,

On Thu, Sep 20, 2012 at 4:27 AM,  [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -140,6 +156,18 @@ static void process_batteryservice_char(struct characteristic *ch)
        }
 }

+static void batterylevel_enable_notify_cb(guint8 status, const guint8 *pdu,
+                                               guint16 len, gpointer user_data)
+{
+       struct characteristic *ch = (struct characteristic *)user_data;
Casting above seems unnecessary (gpointer is typedef to void*).
quoted hunk ↗ jump to hunk
+
+       if (status != 0) {
+               error("Could not enable batt level notification.");
+               ch->canNotify = FALSE;
This camelCase is inconsistent with other struct fields on the same file.
quoted hunk ↗ jump to hunk
+               process_batteryservice_char(ch);
+       }
+}
+
 static gint device_battery_cmp(gconstpointer a, gconstpointer b)
 {
        const struct characteristic *ch = a;
Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help