summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-11-21 02:11:55 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2013-11-21 02:11:55 +0100
commit35bf6758f61cbbabd53492b20fa7e92d41d80438 (patch)
treea3db84aff4faf9c101f453def05ebb1b5a0ccbeb /src
parent7b10af8a9fa45421f61f45d4ecafadc14c63f3f3 (diff)
downloadneard-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 1fd76fb..a2c3a84 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();