projects
/
platform
/
core
/
connectivity
/
bluetooth-frwk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modify the privilege for battry RX / TX function
[platform/core/connectivity/bluetooth-frwk.git]
/
bt-service
/
bt-service-obex-server.c
diff --git
a/bt-service/bt-service-obex-server.c
b/bt-service/bt-service-obex-server.c
index
e46d1f8
..
4363a7e
100644
(file)
--- a/
bt-service/bt-service-obex-server.c
+++ b/
bt-service/bt-service-obex-server.c
@@
-585,13
+585,12
@@
static gboolean __bt_authorize_cb(GDBusMethodInvocation *context,
GVariant *val;
gsize len = 0;
while (g_variant_iter_loop(iter, "{sv}", &key, &val)) {
GVariant *val;
gsize len = 0;
while (g_variant_iter_loop(iter, "{sv}", &key, &val)) {
- if (g_strcmp0(key, "Name") == 0)
{
+ if (g_strcmp0(key, "Name") == 0)
agent_info.auth_info->filename = g_variant_dup_string(val, &len);
agent_info.auth_info->filename = g_variant_dup_string(val, &len);
- } else if (g_strcmp0(key, "Address") == 0) {
+ else if (g_strcmp0(key, "Address") == 0)
bdaddress = g_variant_dup_string(val, &len);
bdaddress = g_variant_dup_string(val, &len);
- } else if (g_strcmp0(key, "Size") == 0) {
+ else if (g_strcmp0(key, "Size") == 0)
agent_info.auth_info->file_size = g_variant_get_uint64(val);
agent_info.auth_info->file_size = g_variant_get_uint64(val);
- }
}
g_variant_iter_free(iter);
}
}
g_variant_iter_free(iter);
}
@@
-916,9
+915,8
@@
int _bt_register_obex_server(void)
BT_OBEX_MANAGER,
NULL, &g_error);
BT_OBEX_MANAGER,
NULL, &g_error);
- if (manager_proxy == NULL)
{
+ if (manager_proxy == NULL)
return BLUETOOTH_ERROR_INTERNAL;
return BLUETOOTH_ERROR_INTERNAL;
- }
result = g_dbus_proxy_call_sync(manager_proxy, "RegisterAgent",
g_variant_new("(o)", BT_OBEX_SERVER_AGENT_PATH),
result = g_dbus_proxy_call_sync(manager_proxy, "RegisterAgent",
g_variant_new("(o)", BT_OBEX_SERVER_AGENT_PATH),
@@
-990,11
+988,10
@@
gboolean __bt_check_folder_path(const char *dest_path)
char *__bt_transfer_folder_path(char *dest_path)
{
char *dst_path = (char *)g_malloc0(BT_OBEX_PATH_MAX_LENGTH);
char *__bt_transfer_folder_path(char *dest_path)
{
char *dst_path = (char *)g_malloc0(BT_OBEX_PATH_MAX_LENGTH);
- if (g_str_has_prefix(dest_path, BT_OBEX_PATH_PREFIX))
{
+ if (g_str_has_prefix(dest_path, BT_OBEX_PATH_PREFIX))
snprintf(dst_path, BT_OBEX_PATH_MAX_LENGTH, BT_OBEX_DEFAULT_PATH"%s", dest_path + strlen(BT_OBEX_PATH_PREFIX));
snprintf(dst_path, BT_OBEX_PATH_MAX_LENGTH, BT_OBEX_DEFAULT_PATH"%s", dest_path + strlen(BT_OBEX_PATH_PREFIX));
- } else {
+ else
snprintf(dst_path, BT_OBEX_PATH_MAX_LENGTH, "%s", dest_path);
snprintf(dst_path, BT_OBEX_PATH_MAX_LENGTH, "%s", dest_path);
- }
BT_INFO("obex transfed path : %s", dst_path);
return dst_path;
BT_INFO("obex transfed path : %s", dst_path);
return dst_path;
@@
-1302,11
+1299,10
@@
int _bt_obex_server_is_activated(gboolean *activated)
{
BT_CHECK_PARAMETER(activated, return);
{
BT_CHECK_PARAMETER(activated, return);
- if (agent_info.custom_server)
{
+ if (agent_info.custom_server)
*activated = TRUE;
*activated = TRUE;
- } else {
+ else
*activated = FALSE;
*activated = FALSE;
- }
return BLUETOOTH_ERROR_NONE;
}
return BLUETOOTH_ERROR_NONE;
}
@@
-1315,11
+1311,10
@@
int _bt_obex_server_check_allocation(gboolean *allocation)
{
BT_CHECK_PARAMETER(allocation, return);
{
BT_CHECK_PARAMETER(allocation, return);
- if (agent_info.native_server || agent_info.custom_server)
{
+ if (agent_info.native_server || agent_info.custom_server)
*allocation = TRUE;
*allocation = TRUE;
- } else {
+ else
*allocation = FALSE;
*allocation = FALSE;
- }
return BLUETOOTH_ERROR_NONE;
}
return BLUETOOTH_ERROR_NONE;
}
@@
-1349,11
+1344,10
@@
int _bt_obex_server_is_receiving(gboolean *receiving)
{
BT_CHECK_PARAMETER(receiving, return);
{
BT_CHECK_PARAMETER(receiving, return);
- if (transfers == NULL || g_slist_length(transfers) == 0)
{
+ if (transfers == NULL || g_slist_length(transfers) == 0)
*receiving = FALSE;
*receiving = FALSE;
- } else {
+ else
*receiving = TRUE;
*receiving = TRUE;
- }
return BLUETOOTH_ERROR_NONE;
}
return BLUETOOTH_ERROR_NONE;
}