dfu: Do not try to verify the element write if upload is unsupported

This commit is contained in:
Richard Hughes 2017-10-12 17:29:07 +01:00
parent 64179e42af
commit 8232d250a2

View File

@ -1585,7 +1585,8 @@ dfu_target_download_element (DfuTarget *target,
} }
/* verify */ /* verify */
if (flags & DFU_TARGET_TRANSFER_FLAG_VERIFY) { if (flags & DFU_TARGET_TRANSFER_FLAG_VERIFY &&
dfu_device_has_attribute (priv->device, DFU_DEVICE_ATTRIBUTE_CAN_UPLOAD)) {
GBytes *bytes; GBytes *bytes;
GBytes *bytes_tmp; GBytes *bytes_tmp;
g_autoptr(DfuElement) element_tmp = NULL; g_autoptr(DfuElement) element_tmp = NULL;