[ITC][Non-ACR][HTTP][Fix timing issue] 44/203244/1
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 11 Apr 2019 04:53:09 +0000 (13:53 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 11 Apr 2019 04:56:34 +0000 (13:56 +0900)
progress callback is called before running g_main_loop.
For that reason, it occurs that http transaction is finished abnormally.

Change-Id: If906b915e3cbcdba0d27ae782abde2643ef22402
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
src/itc/http/ITs-http-transaction.c

index f3bfa255dff814ac3088d41f75ec8bcaaceb31a0..3cf0cfe782be3d6d25f84a16a22c6641856a26a9 100755 (executable)
@@ -269,8 +269,11 @@ static void HttpTransactionProgressCB(http_transaction_h http_transaction, doubl
 #if DEBUG
        FPRINTF("[Line : %d][%s] HttpTransactionProgressCB callback called\\n", __LINE__, API_NAMESPACE);
 #endif
-       b_HttpTransactionProgressCB = true;
-       g_bCallbackHit = true;
+
+       if (download_total > 0) {
+               b_HttpTransactionProgressCB = true;
+               g_bCallbackHit = true;
+       }
 
        return;
 }