[Boiler Plate] Update Boiler plate to remove unwanted information
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-common.c
old mode 100644 (file)
new mode 100755 (executable)
index 71e4ec2..c114017
@@ -1,11 +1,5 @@
 /*
- * Bluetooth-frwk
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:  Hocheol Seo <hocheol.seo@samsung.com>
- *              Girishashok Joshi <girish.joshi@samsung.com>
- *              Chanyeol Park <chanyeol.park@samsung.com>
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,8 +23,6 @@
 #include <errno.h>
 #include <termios.h>
 #include <net_connection.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
 #include <dbus/dbus.h>
 #include <glib.h>
 #include <dlog.h>
 #include <bundle.h>
 #include <eventsystem.h>
 
-#include <bundle.h>
-#include <eventsystem.h>
-
-
 #include "bluetooth-api.h"
 #include "bt-service-common.h"
 #include "bt-service-agent.h"
@@ -63,11 +51,7 @@ GDBusConnection *_bt_gdbus_init_system_gconn(void)
 {
        GError *error = NULL;
 
-       if (!g_thread_supported()) {
-               g_thread_init(NULL);
-       }
-
-//     dbus_g_thread_init();
+       dbus_threads_init_default();
 
        g_type_init();
 
@@ -307,13 +291,12 @@ static char *__bt_extract_adapter_path(GVariantIter *iter)
                if (object_path == NULL)
                        continue;
 
-               while (g_variant_iter_loop(interface_iter, "{sa{sv}}",
+               while (g_variant_iter_loop(interface_iter, "{&sa{sv}}",
                                &interface_str, &svc_iter)) {
                        if (g_strcmp0(interface_str, "org.bluez.Adapter1") != 0)
                                continue;
 
                        BT_DBG("Object Path: %s", object_path);
-                       g_free(interface_str);
                        g_variant_iter_free(svc_iter);
                        g_variant_iter_free(interface_iter);
                        return g_strdup(object_path);
@@ -814,9 +797,9 @@ int _bt_eventsystem_set_value(const char *event, const char *key, const char *va
 
        bundle_add_str(b, key, value);
 
-       ret = eventsystem_request_sending_system_event(event, b);
+       ret = eventsystem_send_system_event(event, b);
 
-       BT_DBG("request_sending_system_event result: %d", ret);
+       BT_DBG("eventsystem_send_system_event result: %d", ret);
 
        bundle_free(b);