platform/upstream/neard.git
11 years agosnep: SNEP GET client for Android 4.1 handover support
Olivier Guiter [Tue, 11 Sep 2012 13:44:22 +0000 (15:44 +0200)]
snep: SNEP GET client for Android 4.1 handover support

Prepare a SNEP GET frame to request bluetooth handover select frame from
Android 4.1 devices.

11 years agosnep: SNEP GET request for Android 4.1 handover
Olivier Guiter [Tue, 11 Sep 2012 13:44:21 +0000 (15:44 +0200)]
snep: SNEP GET request for Android 4.1 handover

Handle incoming SNEP GET request from an Android 4.1 device. This code
includes a hack to fix malformed Android NDEF frame ('Hr' is used instead
of 'cr').
Also handling SNEP GET from the server goes against the SNEP specifications
recomendations but is mandatory to support all Jelly Bean NFC devices.

11 years agohandover: Add fallback code for p2p services
Olivier Guiter [Tue, 11 Sep 2012 13:44:20 +0000 (15:44 +0200)]
handover: Add fallback code for p2p services

This code would allow non-strict implementations of p2p (e.g. Android 4
uses SNEP for handover, so first we try to connect to the Handover service,
and, if it fails, fallback to SNEP service) services.

11 years agobluetooth: Support malformed oob record
Olivier Guiter [Tue, 11 Sep 2012 13:44:19 +0000 (15:44 +0200)]
bluetooth: Support malformed oob record

Some oob structure are malformed (e.g.: Android 4.1) with the oob
length stored as big endian (requirements are little endian). As
the length size is ALWAYS one byte (because of payload length size)
the length is always below 0x100.

11 years agop2p: Fix returned error code in p2p_listen
Wiktor Lawski [Mon, 10 Sep 2012 07:41:25 +0000 (09:41 +0200)]
p2p: Fix returned error code in p2p_listen

In the previous version that function always returned 0 because of logical
error. Now when all bindings fail it will return -1.

11 years agonfctype2: Fix possible memory leak in meta_recv
Wiktor Lawski [Mon, 10 Sep 2012 07:43:25 +0000 (09:43 +0200)]
nfctype2: Fix possible memory leak in meta_recv

Tag was not freed when data_read failed.

11 years agobluetooth: Fix default adapter check
Olivier Guiter [Thu, 6 Sep 2012 08:45:35 +0000 (10:45 +0200)]
bluetooth: Fix default adapter check

Check for def_adapter instead of bt_name.

11 years agoAUTHORS: Mention Wiktor's contributions
Samuel Ortiz [Fri, 7 Sep 2012 15:17:41 +0000 (17:17 +0200)]
AUTHORS: Mention Wiktor's contributions

11 years agoadapter: Fix SetProperty error message
Wiktor Lawski [Mon, 3 Sep 2012 09:57:29 +0000 (11:57 +0200)]
adapter: Fix SetProperty error message

Now when adapter is disabled and an attempt is made to disable it, correct
error message will be returned.

11 years agonfctype1: Improve returned errors consistency
Wiktor Lawski [Mon, 3 Sep 2012 09:57:26 +0000 (11:57 +0200)]
nfctype1: Improve returned errors consistency

Match returned error and message with Tag Type 2.

11 years agoplugins: Delete unnecessary initializes
Wiktor Lawski [Mon, 3 Sep 2012 09:57:25 +0000 (11:57 +0200)]
plugins: Delete unnecessary initializes

Those variables are always written before read so there is no need to
initialize them.

11 years agoplugins: Fix error messages
Wiktor Lawski [Mon, 3 Sep 2012 09:57:24 +0000 (11:57 +0200)]
plugins: Fix error messages

Make errors from plugins follow the same message convention.

11 years agoplugins: Improve code & comments formatting
Wiktor Lawski [Mon, 3 Sep 2012 09:57:23 +0000 (11:57 +0200)]
plugins: Improve code & comments formatting

11 years agoplugins: Fix some whitespace issues
Wiktor Lawski [Mon, 3 Sep 2012 09:57:22 +0000 (11:57 +0200)]
plugins: Fix some whitespace issues

11 years agogitignore: Add temporary files & TAGS to ignore list
Wiktor Lawski [Mon, 3 Sep 2012 09:57:21 +0000 (11:57 +0200)]
gitignore: Add temporary files & TAGS to ignore list

These files are often created during development.

11 years agogdbus: Fix compilation error if macro "error" is defined
Jaganath Kanakkassery [Thu, 16 Aug 2012 12:51:19 +0000 (18:21 +0530)]
gdbus: Fix compilation error if macro "error" is defined

The variable "signature" used in error is not defined and "args" is now
a struct instead of a string.

11 years agoRelease 0.6 0.6
Samuel Ortiz [Thu, 23 Aug 2012 22:05:08 +0000 (00:05 +0200)]
Release 0.6

11 years agonfctype4: Remove the math.h inclusion
Samuel Ortiz [Thu, 23 Aug 2012 19:11:30 +0000 (21:11 +0200)]
nfctype4: Remove the math.h inclusion

No need for it now that pow() is gone...

11 years agonfctype4: Remove the MIFARE_DESFIRE_EV1_SIZE macro
Samuel Ortiz [Thu, 23 Aug 2012 19:05:54 +0000 (21:05 +0200)]
nfctype4: Remove the MIFARE_DESFIRE_EV1_SIZE macro

pow() converts its arguments into float, and this macro was basically
doing (1 << (x / 2)). Since it's only used once, let's remove it.

11 years agondef: Fix parse_mime_type() parameter name
Olivier Guiter [Thu, 23 Aug 2012 14:25:21 +0000 (16:25 +0200)]
ndef: Fix parse_mime_type() parameter name

11 years agonfctype3: Support blank tag formatting
Ravi kumar Veeramally [Mon, 20 Aug 2012 15:16:27 +0000 (18:16 +0300)]
nfctype3: Support blank tag formatting

When using a new tag for the first time, sytem code and attribute
block might not be existed (un-formatted tag) this was causing the
tag to be dropped. Currently it supports only Felica Lite series.
This patch add handling for such tags:

    1) When a tag with out system code(12FC) is found and reported
       it as blank tag, updating sytem code depends upon the tag
       series (now supporting only Felica Lite series).
    2) Write attribute block information like NDEF version, max blocks
       for NDEF content, zero NDEF length and read write permissions.
    3) Call back the format_resp with status (in case of success, tag is
       ready to write and read).

11 years agonfctype3: Detect blank tags while reading
Ravi kumar Veeramally [Mon, 20 Aug 2012 15:16:26 +0000 (18:16 +0300)]
nfctype3: Detect blank tags while reading

If tag is empty means no NDEF content in tag does not support
system code 0x12FC(in polling). In case of blank tags polling
request response is an error. Finding out tag is blank or not
couple of more steps added before tag reading. Currently it
supports only Felica Lite.
   1) Poll Type-3 tag with 0xFFFF system code.
   2) In response to poll command, tag ID and manufacturer parameter
      will be received. And Manufacturer information contains IC Type
      which is used to identify the tag is Felica Lite, LiteS or other.
   3) Depends upon the tag, read block number 0x88(MC Block) which
      contains memory configuration.
   4) MC contains system code(byte3) related information. If tag is
      blank then it is '0x00', if tag supports NDEF( that means it
      supports system code 0x12FC) then it is '0x01'.
   5) If byte3 is 0x00 then it as 'Blank tag', if it contains 0x01
      then detect ndef(poll with 12FC), read and write.
   6) In case tag is not Felica Lite series then detect ndef
      (poll with 12FC), read and write.

11 years agotag: Caching type3 tag IC type information
Ravi kumar Veeramally [Tue, 21 Aug 2012 08:09:44 +0000 (11:09 +0300)]
tag: Caching type3 tag IC type information

The type3 tag IC type information will be used for tag formatting.

11 years agotest: Add simple-agent script
Samuel Ortiz [Thu, 23 Aug 2012 10:47:49 +0000 (12:47 +0200)]
test: Add simple-agent script

Mostly to check that neard sends the right data to the right NDEF agent.

11 years agoorg.neard.conf: Add the NDEF Agent interface sending permissions
Samuel Ortiz [Thu, 23 Aug 2012 10:47:02 +0000 (12:47 +0200)]
org.neard.conf: Add the NDEF Agent interface sending permissions

11 years agoagent: Parse tags and devices records
Samuel Ortiz [Thu, 23 Aug 2012 10:45:41 +0000 (12:45 +0200)]
agent: Parse tags and devices records

If a record type matches an agent registered type, GetNDEF will be called.

11 years agoagent: Send Release method when freeing an NDEF agent
Samuel Ortiz [Thu, 23 Aug 2012 10:41:19 +0000 (12:41 +0200)]
agent: Send Release method when freeing an NDEF agent

11 years agondef: Export the record type field to the neard core
Samuel Ortiz [Wed, 22 Aug 2012 14:49:08 +0000 (16:49 +0200)]
ndef: Export the record type field to the neard core

11 years agodoc: Rename handover-agent-api to agent-api
Samuel Ortiz [Wed, 22 Aug 2012 10:54:15 +0000 (12:54 +0200)]
doc: Rename handover-agent-api to agent-api

This document now also includes the NDEF agent API description.

11 years agondef: Build a record type string for each NDEF record
Samuel Ortiz [Tue, 21 Aug 2012 18:08:52 +0000 (20:08 +0200)]
ndef: Build a record type string for each NDEF record

This record type string will be matched against the registered type
NDEF agents are monitoring.

11 years agoTODO: Change Handover Agent API owner
Szymon Janc [Fri, 17 Aug 2012 14:46:51 +0000 (16:46 +0200)]
TODO: Change Handover Agent API owner

11 years agodoc: Update handover agent api
Szymon Janc [Fri, 17 Aug 2012 14:46:50 +0000 (16:46 +0200)]
doc: Update handover agent api

Handover agent will now receive and provide raw binary blob with EIR.
Thanks to this neard will not have to have any Bluetooth specific
code related to handover.

11 years agonfctype3: Support blank tag detection in check presence
Ravi kumar Veeramally [Fri, 17 Aug 2012 11:16:58 +0000 (14:16 +0300)]
nfctype3: Support blank tag detection in check presence

System code 0x12FC is used to find NDEF in Type-3 tags. In case
of blank tags, tag does not support system code 12FC. So polling
with 0xFFFF system code returns ID if tag is in range.

11 years agonetlink: Fix return value when NLA_PUT_* macros are used
Szymon Janc [Thu, 16 Aug 2012 08:31:45 +0000 (10:31 +0200)]
netlink: Fix return value when NLA_PUT_* macros are used

NLA_PUT_* macros contain hidden goto and in case of error don't set
error value. This results in returning non-error (zero) or garbage
value when error occurs.

To avoid confusion explicite assign err value before calling NLA_PUT_*
macros.

11 years agonfctype4: Add support for blank tag handling
Ravi kumar Veeramally [Thu, 16 Aug 2012 14:31:53 +0000 (16:31 +0200)]
nfctype4: Add support for blank tag handling

When using a new tag for the first time, the CC fie and ndef file might
not be created (un-formatted tag) this was causing the tag to be dropped.
This patch add handling for such tags:

    * When a tag with out CC file is found, it is marked as blank tag
      and is not dropped.
    * Add a new nfctype4_format() function used for creating iso file
      (D2760000850101h), CC (E103h) file and empty NDEF (E104h) file
      in blank t4 (mifare desfire ev1 2K, 4K and 8K) tags with desfire
      commands. And select iso file, cc file and ndef file with
      iso 7816-4 commands to make sure ndef file is ready to write.

11 years agonfctype4: Report empty tags as blank tags
Ravi kumar Veeramally [Tue, 14 Aug 2012 15:46:41 +0000 (18:46 +0300)]
nfctype4: Report empty tags as blank tags

Tag without NDEF data does not mean that tag is malformed.
Treating them as blank tags.

11 years agoAUTHORS: Mention Szymon's contributions
Samuel Ortiz [Tue, 14 Aug 2012 15:59:57 +0000 (17:59 +0200)]
AUTHORS: Mention Szymon's contributions

11 years agondef: Fix returned error code in near_ndef_count_records
Szymon Janc [Thu, 9 Aug 2012 13:42:52 +0000 (15:42 +0200)]
ndef: Fix returned error code in near_ndef_count_records

In case of error positive value was returned due to err being of
unsigned type uint8_t.

11 years agop2p: Fix not freeing server_data in free_server_data
Szymon Janc [Wed, 8 Aug 2012 07:42:06 +0000 (09:42 +0200)]
p2p: Fix not freeing server_data in free_server_data

Free server_data when clearing servers list. This fix following issue
reported by valgrind:

84 bytes in 3 blocks are definitely lost in loss record 167 of 210
   at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
   by 0x4095C5A: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
   by 0x40961DC: g_try_malloc0 (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
   by 0x8056853: p2p_listen (p2p.c:247)
   by 0x407FA21: g_hash_table_foreach (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
   by 0x805BA2F: __near_adapter_listen (adapter.c:1048)
   by 0x805C64D: near_device_driver_register (device.c:461)
   by 0x80567E2: p2p_init (p2p.c:374)
   by 0x805E317: __near_plugin_init (plugin.c:180)
   by 0x804E0E1: main (main.c:214)

11 years agobluetooth: Fix EIR parsing
Szymon Janc [Tue, 7 Aug 2012 12:22:36 +0000 (14:22 +0200)]
bluetooth: Fix EIR parsing

Fix parsing of EIR data to avoid reading data from wrong offset.
This also fix invalid memory access reported by valgrind which could
potentially result in daemon crash.

neard[30296]: src/bluetooth.c:bt_parse_eir()
neard[30296]: Unknown EIR: x03 (len: 4)
neard[30296]: Unknown EIR: x00 (len: 253)
==30296== Invalid read of size 1
==30296==    at 0x8064DF8: __near_bluetooth_parse_oob_record (bluetooth.c:531)
==30296==    by 0x8060DF3: parse_mime_type.isra.3 (ndef.c:1299)
==30296==    by 0x8062043: near_ndef_parse (ndef.c:2124)
==30296==    by 0x8063BB7: near_tlv_parse (tlv.c:95)
==30296==    by 0x8053252: data_recv (nfctype2.c:148)
==30296==    by 0x8059D03: execute_recv_cb (adapter.c:846)
==30296==    by 0x408D1BF: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x408FEF2: g_main_context_dispatch (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x409028F: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x40906EA: g_main_loop_run (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x41E44D2: (below main) (libc-start.c:226)
==30296==  Address 0x4556405 is 13 bytes inside a block of size 22 free'd
==30296==    at 0x402B06C: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==30296==    by 0x4095FCA: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x409613F: g_free (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x805CCAF: near_tag_get_tag (tag.c:94)
==30296==    by 0x8052F36: meta_recv (nfctype2.c:221)
==30296==    by 0x8059D03: execute_recv_cb (adapter.c:846)
==30296==    by 0x408D1BF: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x408FEF2: g_main_context_dispatch (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x409028F: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x40906EA: g_main_loop_run (in /lib/i386-linux-gnu/libglib-2.0.so.0.3306.0)
==30296==    by 0x41E44D2: (below main) (libc-start.c:226)

11 years agosnep: Remove unreachable code in snep_read
Szymon Janc [Tue, 7 Aug 2012 12:22:35 +0000 (14:22 +0200)]
snep: Remove unreachable code in snep_read

11 years agosnep: Fix possible memory leak in snep_read
Szymon Janc [Tue, 7 Aug 2012 12:22:34 +0000 (14:22 +0200)]
snep: Fix possible memory leak in snep_read

Free previously allocated snep_data if nfc_data allocation failed
before returning error.

11 years agonfctype3: Always free cookie in case of error
Szymon Janc [Tue, 7 Aug 2012 12:22:33 +0000 (14:22 +0200)]
nfctype3: Always free cookie in case of error

Free cookie allocated in nfctype3_recv_UID in case of error
irrespectively of callback being present.

11 years agonfctype3: Fix possible memory leak in nfctype3_read
Szymon Janc [Tue, 7 Aug 2012 12:22:32 +0000 (14:22 +0200)]
nfctype3: Fix possible memory leak in nfctype3_read

If call to near_adapter_send() failed cookie should be freed before
returning.

11 years agonfctype3: Fix possible NULL pointer dereference in nfctype3_read
Szymon Janc [Tue, 7 Aug 2012 12:22:31 +0000 (14:22 +0200)]
nfctype3: Fix possible NULL pointer dereference in nfctype3_read

Check if memory allocation succeed before dereferencing pointer.

11 years agonfctype3: Fix possible NULL pointer dereference in nfctype3_recv_UID
Szymon Janc [Tue, 7 Aug 2012 12:22:30 +0000 (14:22 +0200)]
nfctype3: Fix possible NULL pointer dereference in nfctype3_recv_UID

Check if memory allocation succeed before dereferencing pointer and
free any allocated memory before returning. This also fix memory leak
if call to near_adapter_send failed.

11 years agonfctype2: Fix possible NULL pointer dereference in nfctype2_format
Szymon Janc [Tue, 7 Aug 2012 12:22:29 +0000 (14:22 +0200)]
nfctype2: Fix possible NULL pointer dereference in nfctype2_format

Check if memory allocation succeed before dereferencing pointers and
free any allocated memory before returning. This also fix memory leaks
if call to near_adapter_send failed.

11 years agonfctype2: Fix possible NULL pointer dereference in data_write
Szymon Janc [Tue, 7 Aug 2012 12:22:28 +0000 (14:22 +0200)]
nfctype2: Fix possible NULL pointer dereference in data_write

Check if memory allocation succeed before dereferencing pointer.

11 years agonfctype2: Fix possible memory leak in nfctype2_read_meta
Szymon Janc [Tue, 7 Aug 2012 12:22:27 +0000 (14:22 +0200)]
nfctype2: Fix possible memory leak in nfctype2_read_meta

If call to near_adapter_send() failed cookie should be freed before
returning.

11 years agonfctype2: Fix possible NULL pointer dereference in nfctype2_read_meta
Szymon Janc [Tue, 7 Aug 2012 12:22:26 +0000 (14:22 +0200)]
nfctype2: Fix possible NULL pointer dereference in nfctype2_read_meta

Check if memory allocation succeed before dereferencing pointer.

11 years agonfctype1: Fix possible NULL pointer dereference in nfctype1_read
Szymon Janc [Tue, 7 Aug 2012 12:22:25 +0000 (14:22 +0200)]
nfctype1: Fix possible NULL pointer dereference in nfctype1_read

Check if memory allocation succeed before dereferencing pointer.

11 years agomifare: Fix possible NULL pointer dereference in mifare_read
Szymon Janc [Tue, 7 Aug 2012 12:22:24 +0000 (14:22 +0200)]
mifare: Fix possible NULL pointer dereference in mifare_read

Check if memory allocation succeed before dereferencing pointer.

11 years agoFix some common spelling errors and typos
Szymon Janc [Tue, 7 Aug 2012 12:22:23 +0000 (14:22 +0200)]
Fix some common spelling errors and typos

11 years agoFix some whitespace issues
Szymon Janc [Tue, 7 Aug 2012 12:22:22 +0000 (14:22 +0200)]
Fix some whitespace issues

12 years agoTODO: Change Mifare writer mode support owner
Chlad Sebastian [Fri, 3 Aug 2012 08:57:28 +0000 (10:57 +0200)]
TODO: Change Mifare writer mode support owner

12 years agonfctype4: Call write callback when write is succesful
Ravi kumar Veeramally [Mon, 6 Aug 2012 14:26:05 +0000 (17:26 +0300)]
nfctype4: Call write callback when write is succesful

12 years agotag: Verify tag content only when the write part succeeded
Ravi kumar Veeramally [Mon, 6 Aug 2012 14:26:04 +0000 (17:26 +0300)]
tag: Verify tag content only when the write part succeeded

12 years agodoc: Document the Dual polling loop mode
Samuel Ortiz [Tue, 7 Aug 2012 10:45:34 +0000 (12:45 +0200)]
doc: Document the Dual polling loop mode

Dual means the polling loop will alternate between initiator
and target modes.

12 years agodevice: Don't try to push an NDEF when the DEP link is down
Samuel Ortiz [Tue, 7 Aug 2012 09:16:11 +0000 (11:16 +0200)]
device: Don't try to push an NDEF when the DEP link is down

12 years agoadapter: Add a DEP state accessor
Samuel Ortiz [Tue, 7 Aug 2012 09:11:27 +0000 (11:11 +0200)]
adapter: Add a DEP state accessor

12 years agoagent: Move handover agent implementation to agent.c
Samuel Ortiz [Thu, 2 Aug 2012 22:45:01 +0000 (00:45 +0200)]
agent: Move handover agent implementation to agent.c

12 years agomanager: Implement NDEF agent registration API
Samuel Ortiz [Thu, 2 Aug 2012 22:38:28 +0000 (00:38 +0200)]
manager: Implement NDEF agent registration API

12 years agoagent: Initial implementation
Samuel Ortiz [Thu, 2 Aug 2012 22:37:36 +0000 (00:37 +0200)]
agent: Initial implementation

The NDEF agent API will allow apps to register for record types and get the
corresponding NDEFs back.

12 years agondef: Copy each record raw data
Samuel Ortiz [Wed, 1 Aug 2012 14:16:09 +0000 (16:16 +0200)]
ndef: Copy each record raw data

Applications may need raw data for external type records.

12 years agondef: Keep track of the record header length
Samuel Ortiz [Wed, 1 Aug 2012 13:43:43 +0000 (15:43 +0200)]
ndef: Keep track of the record header length

12 years agodoc: Update handover agent API
Szymon Janc [Wed, 25 Jul 2012 15:25:10 +0000 (17:25 +0200)]
doc: Update handover agent API

Update API with PushOOB() method that is used to pass OOB data to agent
so it can prepare alternative carrier link.

12 years agodoc: Fix handover agent API description
Szymon Janc [Wed, 25 Jul 2012 15:24:15 +0000 (17:24 +0200)]
doc: Fix handover agent API description

OOB data given by agent is used for both Hr and Hs.
Hash must be present if Randomizer is present in dictionary.

12 years agonfctype1: Add support for blank tag handling
Ravi kumar Veeramally [Wed, 25 Jul 2012 11:25:04 +0000 (14:25 +0300)]
nfctype1: Add support for blank tag handling

When using a new tag for the first time, the CC field might not be
initialized (un-formatted tag) this was causing the tag to be dropped.
this patch add handling for such tags:

    * When a tag with uninitialized CC block is read, it is marked as blank
      and is not dropped.
    * Add a new nfctype1_format() function used for initializing the CC block
      in blank t1 flags.
    * When writing data to a tag, in case the tag is marked as blank, this api
      can be used in order to format the tag before the data is being written
      to it.

12 years agotag: Improve tag formatting and writing operation
Ravi kumar Veeramally [Mon, 23 Jul 2012 16:03:45 +0000 (19:03 +0300)]
tag: Improve tag formatting and writing operation

In format_cb() routine, checking if there is a pending message.
If there is no such thing, it simply returns.
If there is a pending message:
   1) If the formatting failed, sends a D-Bus message back to notify
      the writer that the operation failed.
   2) If the formatting succeeded, calling __near_tag_write() again.
      Making sure tag is no longer blank and calling writing operation.

12 years agodoc: Add Devices to the adapter properties
Samuel Ortiz [Wed, 25 Jul 2012 10:43:35 +0000 (12:43 +0200)]
doc: Add Devices to the adapter properties

12 years agodoc: Fix RequestOOB method description
Samuel Ortiz [Fri, 20 Jul 2012 10:03:57 +0000 (12:03 +0200)]
doc: Fix RequestOOB method description

The OOB data given by the agent is used to build an Hr, not an Hs.

12 years agotag: Update tag content after write record
Jeff Zheng [Tue, 17 Jul 2012 02:15:11 +0000 (10:15 +0800)]
tag: Update tag content after write record

After write record to tag, we should update the tag content by reading
from the adapter.

12 years agodoc: Sync coding-style.txt with oFono
Samuel Ortiz [Wed, 18 Jul 2012 10:18:33 +0000 (12:18 +0200)]
doc: Sync coding-style.txt with oFono

12 years agoRevert "build: Use -Wshadow compiler option"
Marcel Holtmann [Mon, 16 Jul 2012 13:19:38 +0000 (10:19 -0300)]
Revert "build: Use -Wshadow compiler option"

12 years agobuild: Use -Wshadow compiler option
Marcel Holtmann [Sun, 15 Jul 2012 22:15:53 +0000 (19:15 -0300)]
build: Use -Wshadow compiler option

12 years agohandover: Avoid shadowing connection variable
Marcel Holtmann [Sun, 15 Jul 2012 22:15:02 +0000 (19:15 -0300)]
handover: Avoid shadowing connection variable

12 years agondef: Use uri_prefixes to avoid a shadowed variable
Marcel Holtmann [Sun, 15 Jul 2012 22:13:45 +0000 (19:13 -0300)]
ndef: Use uri_prefixes to avoid a shadowed variable

12 years agoAUTHORS: Mention Jeff's contributions
Samuel Ortiz [Thu, 12 Jul 2012 17:29:47 +0000 (19:29 +0200)]
AUTHORS: Mention Jeff's contributions

12 years agoEdit a tag from neard-ui.py
Jeff Zheng [Mon, 9 Jul 2012 07:30:11 +0000 (15:30 +0800)]
Edit a tag from neard-ui.py

In neard-ui.py, double click a record will display a window. User
can edit the record and write back to tag

12 years agonetlink: Remove undefined but declared target activation routines
Samuel Ortiz [Tue, 3 Jul 2012 21:25:55 +0000 (23:25 +0200)]
netlink: Remove undefined but declared target activation routines

Target activation is done by the kernel when connecting to it.

12 years agogdbus: do not check signature twice
Lucas De Marchi [Fri, 18 May 2012 20:30:13 +0000 (17:30 -0300)]
gdbus: do not check signature twice

Message signature is already checked in generic_message(), so there's no
need to check again in the callback.

12 years agogdbus: Fix incorrectly discarded signals
Mikel Astiz [Tue, 22 May 2012 14:58:18 +0000 (16:58 +0200)]
gdbus: Fix incorrectly discarded signals

Signals with no arguments were incorrectly filtered out due to the NULL
inequality check.

12 years agogdbus: Fix removal of filter after last filter_data
Lucas De Marchi [Mon, 25 Jun 2012 15:44:40 +0000 (12:44 -0300)]
gdbus: Fix removal of filter after last filter_data

If there's a signal watch that's also watching for name
(data->name_watch) currently we are trying to remove the message_filter
twice since we may have the following call chain:

filter_data_remove_callback()
  filter_data_free()
    g_dbus_remove_watch()
      filter_data_remove_callback()
filter_data_free()
        dbus_connection_remove_filter()
  dbus_connection_remove_filter()

Because of this we can't currently watch for signals passing the bus
name. After this patch we don't have this issue anymore.

We fix it by removing the filter before calling filter_data_free() if we
are the last filter_data and thus avoid calling
dbus_connection_remove_filter() twice.

12 years agoRelease 0.5 0.5
Samuel Ortiz [Fri, 29 Jun 2012 14:14:50 +0000 (16:14 +0200)]
Release 0.5

12 years agohandover: Free Hs record after sending it
Samuel Ortiz [Fri, 29 Jun 2012 08:13:56 +0000 (10:13 +0200)]
handover: Free Hs record after sending it

12 years agodevice: Free the pushed NDEF instead of offloading that to p2p plugins
Samuel Ortiz [Thu, 28 Jun 2012 17:32:19 +0000 (19:32 +0200)]
device: Free the pushed NDEF instead of offloading that to p2p plugins

12 years agop2p: Free all p2p plugins data before calling their exit routines
Samuel Ortiz [Thu, 28 Jun 2012 17:22:48 +0000 (19:22 +0200)]
p2p: Free all p2p plugins data before calling their exit routines

The exit routine will delete the hash tables that free_server_data() might
try to destroy as well, triggering a GLib warning.

12 years agodevice: Async push_ndef returns NULL when reply is pending
Samuel Ortiz [Thu, 28 Jun 2012 17:16:36 +0000 (19:16 +0200)]
device: Async push_ndef returns NULL when reply is pending

The push_cb routine will send the actual reply back.

12 years agohandover: Factorize push client data freeing routine
Samuel Ortiz [Thu, 28 Jun 2012 17:10:41 +0000 (19:10 +0200)]
handover: Factorize push client data freeing routine

free_hr_push_client also calls the push callback.

12 years agohandover: Remove extra handover_close call
Samuel Ortiz [Thu, 28 Jun 2012 16:44:56 +0000 (18:44 +0200)]
handover: Remove extra handover_close call

12 years agohandover: Free handover records
Samuel Ortiz [Thu, 28 Jun 2012 16:37:50 +0000 (18:37 +0200)]
handover: Free handover records

12 years agotag: Call near_ndef_records_free when freeing tag records
Samuel Ortiz [Thu, 28 Jun 2012 16:34:09 +0000 (18:34 +0200)]
tag: Call near_ndef_records_free when freeing tag records

12 years agondef: Add record list freeing routine
Samuel Ortiz [Thu, 28 Jun 2012 16:32:47 +0000 (18:32 +0200)]
ndef: Add record list freeing routine

12 years agohandover: Free allocated handover record if parsing fails
Samuel Ortiz [Thu, 28 Jun 2012 16:21:06 +0000 (18:21 +0200)]
handover: Free allocated handover record if parsing fails

12 years agondef: Implement Hr record building
Olivier Guiter [Thu, 28 Jun 2012 13:43:49 +0000 (15:43 +0200)]
ndef: Implement Hr record building

Although only Bluetooth is supported right now, the Hr record building
will add the right configuration data depending on the carrier.
This record will be sent in order to initiate a handover.

12 years agondef: Start Bluetooth pairing from the Hs parser
Olivier Guiter [Thu, 28 Jun 2012 13:43:48 +0000 (15:43 +0200)]
ndef: Start Bluetooth pairing from the Hs parser

When successfully parsing an Hs frame a bluetooth pairing will start.

12 years agoFix MB and ME bits checking in handover frame
Olivier Guiter [Thu, 28 Jun 2012 13:43:47 +0000 (15:43 +0200)]
Fix MB and ME bits checking in handover frame

Handover frames can have nested ndef messages, so we have to validate
MB and ME at different levels (from the first record but also from each
ac and cr nested records).

12 years agohandover: Handle Hr and Hs parsing
Olivier Guiter [Thu, 28 Jun 2012 13:43:46 +0000 (15:43 +0200)]
handover: Handle Hr and Hs parsing

When receiving an Hr neard should reply to the initiator with an Hs frame.
When receiving an Hs neard is the initiator and should start the pairing
(or eventually the association).

12 years agohandover: Move handover_close function up
Olivier Guiter [Thu, 28 Jun 2012 13:43:45 +0000 (15:43 +0200)]
handover: Move handover_close function up

12 years agohandover: Add handover_push
Olivier Guiter [Thu, 28 Jun 2012 13:43:44 +0000 (15:43 +0200)]
handover: Add handover_push

This code path will be called when sending a handover request NDEF.