summaryrefslogtreecommitdiff
path: root/profiles/scanparam
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2013-07-19 13:34:09 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2013-07-24 08:41:47 -0700
commitccd0e3783dbfeedd70a94a404580daffac772323 (patch)
tree0991e58287d0f9596bad08fa7f182008a3e9d4a7 /profiles/scanparam
parent1d4f111fae897e5bbee5733955dd2d75c815e659 (diff)
downloadbluez-ccd0e3783dbfeedd70a94a404580daffac772323.tar.gz
attrib: Do not use Write Command in gatt_write_char()
Previously, if no callback was given to gatt_write_char(), it was assumed that a "Write Without Response" (which uses Write Command) should be used instead of Write Request. This "shortcut" is unnecessary (there is gatt_write_cmd() for the situations where Write Without Response is required) and just duplicates code. This commit also fixes the few places where gatt_write_cmd() should be used.
Diffstat (limited to 'profiles/scanparam')
-rw-r--r--profiles/scanparam/scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/profiles/scanparam/scan.c b/profiles/scanparam/scan.c
index 5982c3897..f5db5edc3 100644
--- a/profiles/scanparam/scan.c
+++ b/profiles/scanparam/scan.c
@@ -71,7 +71,7 @@ static void write_scan_params(GAttrib *attrib, uint16_t handle)
att_put_u16(SCAN_INTERVAL, &value[0]);
att_put_u16(SCAN_WINDOW, &value[2]);
- gatt_write_char(attrib, handle, value, sizeof(value), NULL, NULL);
+ gatt_write_cmd(attrib, handle, value, sizeof(value), NULL, NULL);
}
static void refresh_value_cb(const uint8_t *pdu, uint16_t len,