Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFC: NDEF SmartPoster support #275

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Consistent naming
  • Loading branch information
Willy-JL committed Oct 24, 2024
commit a77507c8d1807d260bd589d6c221a2dc25e44cbf
9 changes: 4 additions & 5 deletions applications/main/nfc/plugins/supported_cards/ndef.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,15 @@ static bool ndef_parse_wifi(Ndef* ndef, size_t pos, size_t len) {
static bool
ndef_parse_message(Ndef* ndef, size_t pos, size_t len, size_t message_num, bool smart_poster);
static size_t ndef_parse_tlv(Ndef* ndef, size_t pos, size_t already_parsed);
static bool ndef_parse_payload(
static bool ndef_parse_record(
Ndef* ndef,
size_t pos,
size_t len,
NdefTnf tnf,
const char* type,
uint8_t type_len);

static bool ndef_parse_payload(
static bool ndef_parse_record(
Ndef* ndef,
size_t pos,
size_t len,
Expand Down Expand Up @@ -614,7 +614,7 @@ static bool
}

// Payload Type
char type_buf[32]; // Longest type supported in ndef_parse_payload() is 32 chars excl terminator
char type_buf[32]; // Longest type supported in ndef_parse_record() is 32 chars excl terminator
char* type = type_buf;
bool type_was_allocated = false;
if(type_len) {
Expand All @@ -637,8 +637,7 @@ static bool
} else {
furi_string_cat_printf(ndef->output, "\e*> M%dR%d: ", message_num, record_num);
}
if(!ndef_parse_payload(
ndef, pos, payload_len, flags_tnf.type_name_format, type, type_len)) {
if(!ndef_parse_record(ndef, pos, payload_len, flags_tnf.type_name_format, type, type_len)) {
if(type_was_allocated) free(type);
return false;
}
Expand Down
Loading