Set LE scanning mode to true only in case of success
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-request-handler.c
index 1484486..44df773 100644 (file)
@@ -184,9 +184,9 @@ static void __bt_service_method(GDBusConnection *connection,
                        BT_DBG("No need to check privilege from bt-core");
                } else if (__bt_service_check_privilege(service_function,
                                        service_type, (const char *)sender) == FALSE) {
-                       result = BLUETOOTH_ERROR_PERMISSION_DEINED;
                        BT_ERR("Client don't have the privilege to excute this function");
-
+                       /* TODO: privilege check doesn't work properly. It sometimes reutrns fail. */
+                       result = BLUETOOTH_ERROR_PERMISSION_DEINED;
                        goto fail;
                }
 
@@ -272,7 +272,7 @@ static void __bt_service_method(GDBusConnection *connection,
                g_variant_unref(param3);
                g_variant_unref(param4);
                g_variant_unref(param5);
-               g_free(sender);
+//             g_free(sender);
                FN_END;
                return;
 fail:
@@ -297,7 +297,7 @@ fail:
                g_variant_unref(param3);
                g_variant_unref(param4);
                g_variant_unref(param5);
-               g_free(sender);
+//             g_free(sender);
        }
 
        FN_END;