Empty handover select frames are received when the peer notifies us
about not supporting any of the carrier sent in the handover request
frame.
In that case there is nothing to do but disconnecting from the handover
service.
ndef->cur_ptr += bytes_recv;
ndef->missing_bytes = ndef->cur_record_len - bytes_recv;
+ if (ndef->cur_record_len == NDEF_HR_MSG_MIN_LENGTH) {
+ handover_ndef_parse(client_fd, ndef);
+ return FALSE;
+ }
+
DBG("Handover frame size is %d", ndef->cur_ptr);
/* Next prepare read to complete the read */
goto fail;
}
} else if (reply != NULL) {
+ /* This is a Hs with no cfg and no Ac: No reply and fail */
+ if (rec_type == RECORD_TYPE_WKT_HANDOVER_SELECT &&
+ g_slist_length(acs) == 0) {
+ *reply = NULL;
+ goto fail;
+ }
+
/* Prepare Hs, it depends upon Hr message carrier types */
*reply = near_ndef_prepare_hs_reply(mimes, c_datas);
if (*reply == NULL) {