Replace the sscanf to strtol 89/127489/1 accepted/tizen/4.0/unified/20170816.013202 accepted/tizen/4.0/unified/20170816.015027 accepted/tizen/4.0/unified/20170828.224435 accepted/tizen/unified/20170428.033205 submit/tizen/20170428.004210 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100001 submit/tizen_4.0/20170828.110001 submit/tizen_4.0_unified/20170814.115522 tizen_4.0.m1_release
authorHyuk Lee <hyuk0512.lee@samsung.com>
Thu, 27 Apr 2017 11:52:36 +0000 (20:52 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Thu, 27 Apr 2017 11:52:36 +0000 (20:52 +0900)
Change-Id: I4e66a6316c3a578e162ba1374f1f2282b7259fc0
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
src/bt-share-ui-main.c

index 92981a9..ff56686 100644 (file)
@@ -115,6 +115,8 @@ static int __bt_share_launch_handler(bt_share_appdata_t *ad, bundle *b,
        FN_START;
        const char *transfer_type = NULL;
        const char *temp = NULL;
+       char *ptr = NULL;
+       char *stop = NULL;
        unsigned char tranferred;
        int tr_type = 0;
        sqlite3 *db = NULL;
@@ -201,7 +203,8 @@ static int __bt_share_launch_handler(bt_share_appdata_t *ad, bundle *b,
                        if (temp != NULL) {
                                int current, total;
                                INFO("PROGRESS TEXT: %s", temp);
-                               sscanf(temp, "[%d/%d]", &current, &total);
+                               current = strtol(temp + 1, &stop, 10);
+                               total = strtol(stop + 1, &stop, 10);
                                transfer_data->current_file = current;
                                transfer_data->total_files = total;
                        }