Fix the build error with -fno-common option 85/86185/1 accepted/tizen/common/20160901.143340 accepted/tizen/ivi/20160901.072649 accepted/tizen/mobile/20160901.072601 accepted/tizen/tv/20160901.072612 accepted/tizen/wearable/20160901.072630 submit/tizen/20160901.003334
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 31 Aug 2016 04:17:12 +0000 (13:17 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 31 Aug 2016 04:17:12 +0000 (13:17 +0900)
Change-Id: I9af294734df5445d1d28542e95c9a425df8d9c42
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-share/include/obex-event-handler.h
bt-share/src/bt-share-main.c
bt-share/src/obex-event-handler.c

index ee898fa..f7eb514 100644 (file)
@@ -40,8 +40,6 @@ typedef enum {
        BT_FILE_OTHER   /**<OTHER*/
 } bt_file_type_t;
 
-bt_obex_server_authorize_into_t server_auth_info;
-
 int _bt_get_transfer_id_by_noti_id(int noti_id);
 
 void _bt_clear_receive_noti_list(void);
@@ -59,6 +57,7 @@ void _bt_app_obex_download_dup_file_cb(void *data, void *obj,
 void _bt_get_default_storage(char *storage);
 void _bt_obex_cancel_transfer(void *data);
 
+void _bt_free_auth_info();
 
 #ifdef __cplusplus
 }
index d1b4c04..57e14cb 100644 (file)
@@ -83,8 +83,7 @@ static void __bt_release_service(struct bt_appdata *ad)
        bluetooth_obex_server_deinit();
        _bt_unregister_notification_cb(ad);
 
-       g_free(server_auth_info.filename);
-       server_auth_info.filename = NULL;
+       _bt_free_auth_info();
 
        DBG("Terminating bluetooth-share daemon");
 }
index 87ce76a..eedec78 100644 (file)
@@ -73,6 +73,8 @@ static gboolean isFirstReceivedPacket = FALSE;
 
 static gboolean isTransferConnectedReceived = FALSE;
 
+static bt_obex_server_authorize_into_t g_server_auth_info;
+
 gboolean __bt_scan_media_file(char *file_path);
 
 void *_bt_obex_writeclose(bt_file_info_t *info);
@@ -494,14 +496,14 @@ void _bt_share_event_handler(int event, bluetooth_event_param_t *param,
        case BLUETOOTH_EVENT_OBEX_SERVER_TRANSFER_AUTHORIZE:
                INFO("BT_EVENT_OBEX_TRANSFER_AUTHORIZE");
                if (param->result == BLUETOOTH_ERROR_NONE) {
-                       g_free(server_auth_info.filename);
-                       server_auth_info.filename = NULL;
+                       g_free(g_server_auth_info.filename);
+                       g_server_auth_info.filename = NULL;
 
                        auth_info = param->param_data;
-                       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);
+                       g_server_auth_info.filename = g_strdup(auth_info->filename);
+                       g_server_auth_info.length = auth_info->length;
+                       if (g_server_auth_info.filename)
+                               __bt_obex_file_push_auth(&g_server_auth_info);
                }
                break;
 
@@ -1066,3 +1068,9 @@ void *_bt_obex_writeclose(bt_file_info_t *info)
        return NULL;
 }
 
+void _bt_free_auth_info(void)
+{
+       g_free(g_server_auth_info.filename);
+       g_server_auth_info.filename = NULL;
+}
+