diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-11-21 02:11:55 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-11-21 02:11:55 +0100 |
commit | 35bf6758f61cbbabd53492b20fa7e92d41d80438 (patch) | |
tree | a3db84aff4faf9c101f453def05ebb1b5a0ccbeb /src | |
parent | 7b10af8a9fa45421f61f45d4ecafadc14c63f3f3 (diff) | |
download | neard-35bf6758f61cbbabd53492b20fa7e92d41d80438.tar.gz neard-35bf6758f61cbbabd53492b20fa7e92d41d80438.tar.bz2 neard-35bf6758f61cbbabd53492b20fa7e92d41d80438.zip |
main: Call agent_init first
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -279,13 +279,13 @@ int main(int argc, char *argv[]) exit(1); } + __near_agent_init(); __near_tag_init(); __near_device_init(); __near_adapter_init(); __near_ndef_init(); __near_snep_core_init(); __near_manager_init(conn); - __near_agent_init(); __near_bluetooth_init(); __near_plugin_init(option_plugin, option_noplugin); @@ -303,7 +303,6 @@ int main(int argc, char *argv[]) __near_plugin_cleanup(); - __near_agent_cleanup(); __near_bluetooth_cleanup(); __near_manager_cleanup(); __near_ndef_cleanup(); @@ -311,6 +310,7 @@ int main(int argc, char *argv[]) __near_adapter_cleanup(); __near_device_cleanup(); __near_tag_cleanup(); + __near_agent_cleanup(); __near_netlink_cleanup(); __near_dbus_cleanup(); |