Age | Commit message (Collapse) | Author | Files | Lines |
|
agent_init will register the /org/neard name and if an adapter is
registered before /org/neard is registered, its parent will be "/". That
happens when starting neard with an adapter already plugged in.
|
|
This routine is no longer called.
|
|
Code review done by Sebastian Krahmer <krahmer@suse.de>.
|
|
Code review done by Sebastian Krahmer <krahmer@suse.de>.
|
|
The default behaviour is to power cycle the adapter when receiving a
driver error.
|
|
Receiving a NFC_EVENT_TARGETS_FOUND with a NULL payload means the driver
entered an error state. This is handled by checking if the devices and
targets arrays are empty from the GET_TARGET finish handler.
In the polling error case, neard resets the adapter and starts polling
again.
The polling error handler runs asynchrounously for the D-Bus properties
toggle to be exported properly.
|
|
In some cases (e.g. multipart messages) it is interesting to know when a
messages is finished. Some multipart messages can carry a NULL payload
and without having a NL_CB_FINISH handler, neard never knows when it's
actually finished.
|
|
Besides the record path and the complete NDEF raw data, the matching
record payload is also now exported.
|
|
|
|
There is no need to print all records from the NDEF.
With each matching record, the record path and the NDEF raw data is
pushed back to the agent.
|
|
When we return FALSE from idle handlers, the source is removed.
This will be causing warnings in glib 2.40.
See https://bugzilla.gnome.org/show_bug.cgi?id=710724
|
|
|
|
In Initiator mode, this is when we get a DEP_LINK_UP event.
In target mode, DEP link is up as soon as we see a new device.
This fix avoids racy situations where a Device interface is available
although the DEP link is still not up.
|
|
Give ConnMan and BlueZ a few weeks to transition.
|
|
|
|
|
|
This is replaced with test/test-tag dump
|
|
By resetting n_records to 0 after successfully writing a new Record, the
newly written Record would be exposed with the same path as the previous
one.
n_records become next_record and tracks the next available record index.
|
|
|
|
This is useful for dumping all records from all tags, and avoids
always having to specify a tag path on the test-tag command line.
|
|
When a Tag is leaving the field, it makes more sense to
unregister its associated records before the Device itself, and not the
other way around.
|
|
When a Device is leaving the field, it makes more sense to unregister
its associated records before the Device itself.
|
|
ndef.c handles the Record interface. With the ObjectManager interface,
GetProperties is no longer needed.
|
|
Set and GetProperties are no longer relevant.
Also, there is no longer any need to update the Tags and Records Adapter
properties.
|
|
The adapter argument (e.g. "nfc0") should be the 2nd one, for
consistency sake.
|
|
No need to export the Record property. GetProperties and SetProperties
are also removed.
We also centralize all device related test scripts into test-device, a
la BlueZ.
|
|
The manager Adapters property is removed. And so are the adapter Tags
and Devices properties. All of them become managed objects and thus no
longer need to be explicit parent object properties.
Since the only methods left to the Manager interface were agent
registration ones, the Manager interface becomes the AgentManager one.
|
|
After successfully writing a tag, the next read might fail in which case
tag_read_cb may be called several times. The pending write_msg pointer
needs to be unrefed only once.
|
|
There is no reason for releasing a target after tag writing succeeded.
Especially since check presence still needs the link.
|
|
And make it less confusable with the MIMEType property.
|
|
"Android Application Record (AAR)" is not really D-Bus clients
friendly.
|
|
It is now checked by g_dbus_send_message_with_reply() so there is no
need to double check that in caller.
|
|
"Warning: if the connection is disconnected or you try to send Unix file
descriptors on a connection that does not support them, the
DBusPendingCall will be set to NULL, so be careful with this."
Check this in g_dbus_send_message_with_reply so that callers don't need
to double check for NULL if g_dbus_send_message_with_reply returned
TRUE.
This also fix crash if passing FD over D-Bus is blocked e.g. by SELinux
policy.
bluetoothd[1894]: profiles/audio/avdtp.c:session_cb()
bluetoothd[1894]: profiles/audio/avdtp.c:avdtp_parse_cmd() Received
SET_CONFIGURATION_CMD
bluetoothd[1894]: profiles/audio/a2dp.c:endpoint_setconf_ind() Source
0x6c5000: Set_Configuration_Ind
bluetoothd[1894]: profiles/audio/avdtp.c:avdtp_ref() 0x6df360: ref=1
bluetoothd[1894]: profiles/audio/a2dp.c:setup_ref() 0x6d32b0: ref=1
process 1894: arguments to dbus_pending_call_set_notify() were incorrect,
assertion "pending != NULL" failed in file dbus-pending-call.c line
636.
This is normally a bug in some application using the D-Bus library.
|
|
And TagLost as well. Those signals fix the current racy behaviour where
apps get a Tags property change notification and then ask for the tag
properties. The tag may have disappeared in the meantime.
Eventually, the Tags property should disappear.
|
|
No need to go through the kernel netlink NFC API if the adapter is known
to be down.
|
|
|
|
G_OPTION_ARG_NONE flag in GOptionEntry expects gboolean type instead
of bool.
On platforms where sizeof(bool) != sizeof(gboolean), this patch fixes
runtime parsing error for nfctool.
|
|
neard build fails when performed in a separate directory.
In this case include/near directory contains broken symlinks
and error appears:
neard/plugins/phdc.c:32:23: fatal error: near/dbus.h: No such file or
directory
|
|
cookie is local pointer so there is no need to NULL it when memory
gets released.
|
|
This was never called and cb will be called by data_write in case of
failure so 'return data_write()' is OK.
|
|
NPP is simple: Get the NDEF, include it in an NPP NDEF entry, add an
header and just send it to the peer. That's it.
|
|
Data needs to be added to the device, not the tag.
Also, check the version number.
|
|
|
|
This make the handling much simpler and avoids duplicates of the same
match rule.
|
|
This make the handling much simpler and avoids duplicates of the same
match rule.
|
|
This make the handling much simpler and avoids duplicates of the same
match rule.
|
|
When disconnecting from D-Bus a message could be recieved with no sender:
Invalid read of size 1
at 0x4A09EE1: strcmp (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x3B03C386B8: g_str_equal (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x4065D6: message_filter (watch.c:529)
by 0x3B0700F9E5: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.4)
by 0x4052E7: message_dispatch (mainloop.c:76)
by 0x3B03C48962: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C47E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C48157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C48559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x4038C5: client_proxy_removed (test-gdbus-client.c:902)
by 0x3B03C6B566: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C6B6E5: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
Address 0x0 is not stack'd, malloc'd or (recently) free'd
|
|
In case of filter_data having a watch to a service name it may call
dbus_connection_remove_filter twice causing libdbus to abort:
process 24723: Attempt to remove filter function 0x4063e0 user data (nil), but no such filter has been added
To fix this the code will now only attempt to call
dbus_connection_remove_filter once in filter_data_free which is the
counterpart of filter_data_get where dbus_connection_add_filter is called.
|
|
at 0x40570C: update_service (watch.c:601)
by 0x40584B: service_reply (watch.c:627)
by 0x3B0700C511: ??? (in /usr/lib64/libdbus-1.so.3.7.4)
by 0x3B0700F740: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.4)
by 0x405167: message_dispatch (mainloop.c:76)
by 0x3B03C48962: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C47E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C48157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C48559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
Address 0x4c58a30 is 32 bytes inside a block of size 56 free'd
at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x3B03C4D9AE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x406102: filter_data_remove_callback (watch.c:378)
by 0x405FC0: g_dbus_remove_watch (watch.c:798)
by 0x40A22B: g_dbus_client_unref (client.c:1227)
by 0x40570B: update_service (watch.c:599)
by 0x40584B: service_reply (watch.c:627)
|
|
This fixes double emission of PropertiesChanged introduced by flushing
changes, the flushing can happen during the pending processing so the
pending_prop flag needs to be updated in the beginning and the list of
properties can be freed before g_dbus_send_message as it is not required
anymore.
|