[Comment] The string from FRWK will be freed, so we can't use this address value
2. Fix the crash issue
- Step
a. OPC file sending failed (More than 2)
b. Launch outbound list
c. Retry file sending for first item and immediately retry file sending for second item
- Issue
bluetooth-share got crashed
- Cause
Before OPC session is created, second file sending is requested.
So second job is failed then we removed all transfer list.
- Fix description
Check the return value.
If BLUETOOTH_ERROR_IN_PROGRESS returned, we are skip the exception code
gboolean _bt_init_dbus_signal(void);
void _free_transfer_info(opc_transfer_info_t *node);
void _remove_transfer_info(opc_transfer_info_t *node);
gboolean _bt_init_dbus_signal(void);
void _free_transfer_info(opc_transfer_info_t *node);
void _remove_transfer_info(opc_transfer_info_t *node);
-gboolean _request_file_send(opc_transfer_info_t *node);
+int _request_file_send(opc_transfer_info_t *node);
void _bt_send_message_to_ui(int transfer_id,
char *name,
int percentage,
void _bt_send_message_to_ui(int transfer_id,
char *name,
int percentage,
-gboolean _request_file_send(opc_transfer_info_t *node)
+int _request_file_send(opc_transfer_info_t *node)
{
struct bt_appdata *ad = app_state;
{
struct bt_appdata *ad = app_state;
- retv_if(ad == NULL, FALSE);
- retv_if(node == NULL, FALSE);
+ retv_if(ad == NULL, BLUETOOTH_ERROR_INVALID_PARAM);
+ retv_if(node == NULL, BLUETOOTH_ERROR_INVALID_PARAM);
- if (bluetooth_opc_push_files((bluetooth_device_address_t *)node->addr,
- node->file_path) != BLUETOOTH_ERROR_NONE) {
- DBG("bluetooth_opc_push_files failed ");
- return FALSE;
+ ret = bluetooth_opc_push_files((bluetooth_device_address_t *)node->addr,
+ node->file_path);
+ if (ret != BLUETOOTH_ERROR_NONE) {
+ DBG("bluetooth_opc_push_files failed : %d", ret);
+ return ret;
}
__bt_create_send_data(node);
DBG("-\n");
}
__bt_create_send_data(node);
DBG("-\n");
+ return BLUETOOTH_ERROR_NONE;
}
static DBusHandlerResult __event_filter(DBusConnection *sys_conn,
DBusMessage *msg, void *data)
{
}
static DBusHandlerResult __event_filter(DBusConnection *sys_conn,
DBusMessage *msg, void *data)
{
char *member;
const char *path = dbus_message_get_path(msg);
char *member;
const char *path = dbus_message_get_path(msg);
if (path == NULL || strcmp(path, "/") == 0)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
if (path == NULL || strcmp(path, "/") == 0)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
member = (char *)dbus_message_get_member(msg);
DBG("member (%s)\n", member);
member = (char *)dbus_message_get_member(msg);
DBG("member (%s)\n", member);
node = __add_transfer_info(msg);
if (node == NULL)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
node = __add_transfer_info(msg);
if (node == NULL)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
if (bluetooth_opc_session_is_exist() == FALSE) {
if (bluetooth_opc_session_is_exist() == FALSE) {
- if (!_request_file_send(node)) {
+ ret = _request_file_send(node);
+ if (ret == BLUETOOTH_ERROR_IN_PROGRESS) {
+ DBG("Aleady OPC progressing. Once completed previous job, will be started\n");
+ } else if ( ret != BLUETOOTH_ERROR_NONE) {
_bt_create_warning_popup(BLUETOOTH_ERROR_INTERNAL);
g_slist_free_full(bt_transfer_list,
(GDestroyNotify)_free_transfer_info);
_bt_create_warning_popup(BLUETOOTH_ERROR_INTERNAL);
g_slist_free_full(bt_transfer_list,
(GDestroyNotify)_free_transfer_info);
node = __add_transfer_info(msg);
if (node == NULL)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
node = __add_transfer_info(msg);
if (node == NULL)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
if (bluetooth_opc_session_is_exist() == FALSE) {
if (bluetooth_opc_session_is_exist() == FALSE) {
- if (!_request_file_send(node)) {
+ ret = _request_file_send(node);
+ if (ret == BLUETOOTH_ERROR_IN_PROGRESS) {
+ DBG("Aleady OPC progressing. Once completed previous job, will be started\n");
+ } else if ( ret != BLUETOOTH_ERROR_NONE) {
_bt_create_warning_popup(BLUETOOTH_ERROR_INTERNAL);
g_slist_free_full(bt_transfer_list,
(GDestroyNotify)_free_transfer_info);
_bt_create_warning_popup(BLUETOOTH_ERROR_INTERNAL);
g_slist_free_full(bt_transfer_list,
(GDestroyNotify)_free_transfer_info);
void _bt_share_event_handler(int event, bluetooth_event_param_t *param,
void *user_data)
{
void _bt_share_event_handler(int event, bluetooth_event_param_t *param,
void *user_data)
{
static int send_cnt = 0;
static char *name = NULL;
char str[NOTIFICATION_TEXT_LEN_MAX] = { 0 };
static int send_cnt = 0;
static char *name = NULL;
char str[NOTIFICATION_TEXT_LEN_MAX] = { 0 };
switch (event) {
case BLUETOOTH_EVENT_DISABLED:
switch (event) {
case BLUETOOTH_EVENT_DISABLED:
+ g_free(server_auth_info.filename);
+ server_auth_info.filename = NULL;
_bt_terminate_app();
break;
_bt_terminate_app();
break;
DBG("gList len : %d\n", g_slist_length(bt_transfer_list));
if (g_slist_length(bt_transfer_list) > 0) {
DBG("One more job existed !!\n");
DBG("gList len : %d\n", g_slist_length(bt_transfer_list));
if (g_slist_length(bt_transfer_list) > 0) {
DBG("One more job existed !!\n");
- if (!_request_file_send(bt_transfer_list->data)) {
+ ret = _request_file_send(bt_transfer_list->data);
+ if (ret != BLUETOOTH_ERROR_NONE) {
g_slist_free_full(bt_transfer_list,
(GDestroyNotify)_free_transfer_info);
bt_transfer_list = NULL;
g_slist_free_full(bt_transfer_list,
(GDestroyNotify)_free_transfer_info);
bt_transfer_list = NULL;
case BLUETOOTH_EVENT_OBEX_SERVER_TRANSFER_AUTHORIZE:
DBG("BT_EVENT_OBEX_TRANSFER_AUTHORIZE \n");
if (param->result == BLUETOOTH_ERROR_NONE) {
case BLUETOOTH_EVENT_OBEX_SERVER_TRANSFER_AUTHORIZE:
DBG("BT_EVENT_OBEX_TRANSFER_AUTHORIZE \n");
if (param->result == BLUETOOTH_ERROR_NONE) {
+ g_free(server_auth_info.filename);
+ server_auth_info.filename = NULL;
+
auth_info = param->param_data;
auth_info = param->param_data;
- server_auth_info.filename = auth_info->filename;
+ server_auth_info.filename = g_strdup(auth_info->filename);
server_auth_info.length = auth_info->length;
if (server_auth_info.filename)
__bt_obex_file_push_auth(&server_auth_info);
server_auth_info.length = auth_info->length;
if (server_auth_info.filename)
__bt_obex_file_push_auth(&server_auth_info);
+bluetooth-share (0.0.26) unstable; urgency=low
+
+ * Upload the package
+ * Git: slp/pkgs/b/bluetooth-share
+ * Tag: bluetooth-share_0.0.26
+
+ -- DoHyun Pyun <dh79.pyun@samsung.com> Tue, 11 Sep 2012 11:05:27 +0900
+
bluetooth-share (0.0.25) unstable; urgency=low
* Upload the package
bluetooth-share (0.0.25) unstable; urgency=low
* Upload the package
Name: bluetooth-share
Summary: Bluetooth file share Agent
Name: bluetooth-share
Summary: Bluetooth file share Agent
Release: 1
Group: TO_BE/FILLED_IN
License: TO BE FILLED IN
Release: 1
Group: TO_BE/FILLED_IN
License: TO BE FILLED IN