Diff between e3eb563d068f7825c0fa7b31df158ec6ed8aa042 and d6ca7019866ddb8df3ca186a0207b8d8f9367780

Changed Files

File Additions Deletions Status
thermometer/thermometer.c +4 -8 modified

Full Patch

diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index b4dad79..7621926 100644
--- a/thermometer/thermometer.c
+++ b/thermometer/thermometer.c
@@ -222,20 +222,16 @@ static void read_interval_cb(guint8 status, const guint8 *pdu, guint16 len,
 
 static void process_thermometer_char(struct characteristic *ch)
 {
-	GAttribResultFunc func;
-
 	if (g_strcmp0(ch->attr.uuid, INTERMEDIATE_TEMPERATURE_UUID) == 0) {
 		gboolean intermediate = TRUE;
 		change_property(ch->t, "Intermediate", &intermediate);
 		return;
 	} else if (g_strcmp0(ch->attr.uuid, TEMPERATURE_TYPE_UUID) == 0)
-		func = read_temp_type_cb;
+		gatt_read_char(ch->t->attrib, ch->attr.value_handle, 0,
+							read_temp_type_cb, ch);
 	else if (g_strcmp0(ch->attr.uuid, MEASUREMENT_INTERVAL_UUID) == 0)
-		func = read_interval_cb;
-	else
-		return;
-
-	gatt_read_char(ch->t->attrib, ch->attr.value_handle, 0, func, ch);
+		gatt_read_char(ch->t->attrib, ch->attr.value_handle, 0,
+							read_interval_cb, ch);
 }
 
 static void configure_thermometer_cb(GSList *characteristics, guint8 status,