summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-11-21main: Call agent_init firstSamuel Ortiz1-2/+2
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.
2013-11-21adapter: Remove near_adapter_listSamuel Ortiz2-20/+0
This routine is no longer called.
2013-11-20nfctool: Fix snep-decode potential overflowSamuel Ortiz1-0/+4
Code review done by Sebastian Krahmer <krahmer@suse.de>.
2013-11-20nfctool: Fix llcp-decode potential overflowSamuel Ortiz1-2/+2
Code review done by Sebastian Krahmer <krahmer@suse.de>.
2013-11-20adapter: Make the power cycle upon driver error configurableSamuel Ortiz4-6/+26
The default behaviour is to power cycle the adapter when receiving a driver error.
2013-11-18adapter: Catch polling errorsSamuel Ortiz3-2/+59
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.
2013-11-18netlink: Expose NL_CB_FINISH handlerSamuel Ortiz1-5/+27
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.
2013-11-13agent: Export matching record payload from GetNDEFSamuel Ortiz3-1/+17
Besides the record path and the complete NDEF raw data, the matching record payload is also now exported.
2013-11-13ndef: Implement record payload getterSamuel Ortiz2-0/+9
2013-11-13agent: Only print matching record from NDEF agent's GetNDEFSamuel Ortiz2-29/+10
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.
2013-11-11gdbus: Fix trying to remove already removed sourcesBastien Nocera1-0/+3
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
2013-11-11test: Port bt-handover to the ObjectManager interfaceSamuel Ortiz1-32/+34
2013-11-11device: Create the Device D-Bus interface only when the DEP link is upSamuel Ortiz3-6/+19
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.
2013-11-11agent: Keep legacy interfaces for a few more releasesSamuel Ortiz1-0/+14
Give ConnMan and BlueZ a few weeks to transition.
2013-11-10test: Fix test-tag whitespace damageSamuel Ortiz1-3/+3
2013-11-10tag: Remove trailing whitespacesSamuel Ortiz1-2/+2
2013-11-10test: Remove dump-recordSamuel Ortiz2-33/+1
This is replaced with test/test-tag dump
2013-11-10tag: Create new path when writing a new RecordSamuel Ortiz1-5/+4
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.
2013-11-10test: Add test-device scriptSamuel Ortiz1-0/+115
2013-11-10neardutils: Implement dump_all_recordsSamuel Ortiz2-9/+20
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.
2013-11-10tag: Unregister Record before TagSamuel Ortiz1-6/+3
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.
2013-11-10device: Unregister Record before DeviceSamuel Ortiz1-6/+3
When a Device is leaving the field, it makes more sense to unregister its associated records before the Device itself.
2013-11-10ndef: ObjectManager conversionSamuel Ortiz4-170/+278
ndef.c handles the Record interface. With the ObjectManager interface, GetProperties is no longer needed.
2013-11-10tag: ObjectManager conversionSamuel Ortiz9-367/+181
Set and GetProperties are no longer relevant. Also, there is no longer any need to update the Tags and Records Adapter properties.
2013-11-10test: Fix test-adapter prototypeSamuel Ortiz1-9/+11
The adapter argument (e.g. "nfc0") should be the 2nd one, for consistency sake.
2013-11-10device: ObjectManager conversionSamuel Ortiz6-197/+36
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.
2013-11-10adapter: Initial transition to managed objectsSamuel Ortiz22-684/+510
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.
2013-11-05tag: Do not unref a NULL write messageSamuel Ortiz1-2/+4
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.
2013-10-30nfctype4: Do not release target after a succesful tag writeSamuel Ortiz1-1/+0
There is no reason for releasing a target after tag writing succeeded. Especially since check presence still needs the link.
2013-10-18ndef: Simplify the exported MIME type D-Bus type furtherSamuel Ortiz2-2/+2
And make it less confusable with the MIMEType property.
2013-10-18ndef: Simplify D-Bus exported record type stringsSamuel Ortiz2-3/+5
"Android Application Record (AAR)" is not really D-Bus clients friendly.
2013-10-14gdbus: Remove not needed check for NULL DBusPendingCallSzymon Janc1-5/+0
It is now checked by g_dbus_send_message_with_reply() so there is no need to double check that in caller.
2013-10-14gdbus: Check for NULL DBusPendingCall in g_dbus_send_message_with_replySzymon Janc1-1/+10
"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.
2013-10-14adapter: Implement TagFound signalSamuel Ortiz4-30/+121
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.
2013-10-11adapter: Do not send a poll command when adapter is downSamuel Ortiz1-0/+5
No need to go through the kernel netlink NFC API if the adapter is known to be down.
2013-10-11AUTHORS: Mention Dmytro's contributionsSamuel Ortiz1-0/+1
2013-10-11nfctool: Fix options typeDmytro Bagrii1-10/+10
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.
2013-10-11build: Fix build in separate directoryDmytro Bagrii1-2/+2
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
2013-10-11nfctype2: Remove not needed NULL assignmentSzymon Janc1-1/+0
cookie is local pointer so there is no need to NULL it when memory gets released.
2013-10-11nfctype1: Remove dead code from nfctype1_writeSzymon Janc1-5/+0
This was never called and cb will be called by data_write in case of failure so 'return data_write()' is OK.
2013-09-23npp: Implement npp_pushSamuel Ortiz1-0/+42
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.
2013-09-23npp: Fix npp_readSamuel Ortiz1-1/+12
Data needs to be added to the device, not the tag. Also, check the version number.
2013-09-19Release 0.130.13Samuel Ortiz2-1/+12
2013-09-12gdbus/client: Use g_dbus_add_properties_watch to track propertiesLuiz Augusto von Dentz1-79/+56
This make the handling much simpler and avoids duplicates of the same match rule.
2013-09-12gdbus/client: Use g_dbus_add_signal_watch to track signalsLuiz Augusto von Dentz1-36/+37
This make the handling much simpler and avoids duplicates of the same match rule.
2013-09-12gdbus/client: Use g_dbus_add_service_watch to track servicesLuiz Augusto von Dentz1-135/+38
This make the handling much simpler and avoids duplicates of the same match rule.
2013-09-12gdbus/watch: Fix crash when disconnecting from D-BusLuiz Augusto von Dentz1-0/+2
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
2013-09-12gdbus/watch: Fix aborting when removing D-Bus filterLuiz Augusto von Dentz1-17/+8
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.
2013-09-12gdbus/watch: Fix crash when g_dbus_remove_watch is called from connect callbackLuiz Augusto von Dentz1-2/+6
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)
2013-09-10gdbus: Fix emitting PropertiesChanged twiceLuiz Augusto von Dentz1-2/+2
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.