NDEFs with MIME type records that are not WSC or Bluetooth ones are not
wrong. Their payload won't be processed but the record is kept and
linked to the discovered tag.
NDEF agents will get the binary payload.
Fixes #NFC-45
c_temp->size = record->header->payload_len;
memcpy(c_temp->data, ndef_data + offset, c_temp->size);
} else {
- g_free(mime->type);
- g_free(mime);
g_free(c_temp);
- mime = NULL;
c_temp = NULL;
*c_data = NULL;
- return NULL;
+ return mime;
}
*c_data = c_temp;
ndef_length, offset,
record->header->payload_len,
&c_data);
- if (record->mime == NULL || c_data == NULL)
+ if (record->mime == NULL)
goto fail;
+ /* No carrier data, move on */
+ if (c_data == NULL)
+ break;
+
if (process_mime_type(record->mime, c_data) < 0) {
g_free(c_data);
c_data = NULL;