projects
/
platform
/
upstream
/
neard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
543b602
)
ndef: Support unknown MIME types
author
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 6 Feb 2012 15:04:31 +0000
(16:04 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 6 Feb 2012 15:04:31 +0000
(16:04 +0100)
Unknown MIME types are left without parsing.
src/ndef.c
patch
|
blob
|
history
diff --git
a/src/ndef.c
b/src/ndef.c
index
16cfb52
..
f0b6831
100644
(file)
--- a/
src/ndef.c
+++ b/
src/ndef.c
@@
-464,6
+464,9
@@
static void free_sp_record(struct near_ndef_sp_record *sp)
static void free_mime_record(struct near_ndef_mime_record *mime)
{
+ if (mime == NULL)
+ return;
+
g_free(mime->type);
g_free(mime);
@@
-1181,8
+1184,6
@@
parse_mime_type(struct near_ndef_record *record,
} else if (strcmp(mime->type, "nokia.com:bt") == 0) {
err = __near_bt_parse_oob_record(BT_MIME_V2_0,
&ndef_data[offset]);
- } else {
- err = -EOPNOTSUPP;
}
if (err < 0) {