bug fix: set user_data for aborted callback 03/138703/1 accepted/tizen/unified/20170724.020303 submit/tizen/20170717.234028 submit/tizen/20170721.063342 submit/tizen/20170721.063811
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 13 Jul 2017 04:58:23 +0000 (13:58 +0900)
committerTaesoo Jun <steve.jun@samsung.com>
Thu, 13 Jul 2017 08:53:11 +0000 (17:53 +0900)
Change-Id: I47a59db25657adfdf307e4131104d79a588d3fb0
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
packaging/capi-network-http.spec
src/http_transaction.c
test/http_test.c

index 5bac4e9..bf95421 100644 (file)
@@ -1,6 +1,6 @@
 Name:          capi-network-http
 Summary:       Http Framework
-Version:       0.0.24
+Version:       0.0.25
 Release:       0
 Group:         System/Network
 License:       Apache-2.0
index f5c87d3..ce075a3 100644 (file)
@@ -913,6 +913,7 @@ API int http_transaction_set_aborted_cb(http_transaction_h http_transaction, htt
        __http_transaction_h *transaction = (__http_transaction_h *)http_transaction;
 
        transaction->aborted_cb = aborted_cb;
+       transaction->aborted_user_data = user_data;
 
        return HTTP_ERROR_NONE;
 }
index c275460..615cbca 100644 (file)
@@ -102,32 +102,32 @@ void __transaction_completed_cb(http_transaction_h transaction, void *user_data)
                free(uri);
 }
 
-void __transaction_aborted_cb(http_transaction_h transaction, int reason, void *user_data)
+void __transaction_aborted_cb(http_transaction_h transaction, http_error_code_e reason, void *user_data)
 {
        PRG("transaction_aborted_cb", transaction);
        DBG("aborted reason: %d\n", reason);
 
        switch (reason) {
        case HTTP_ERROR_OPERATION_FAILED:
-               DBG("HTTP_ERROR_OPERATION_FAILED");
+               DBG("HTTP_ERROR_OPERATION_FAILED\n");
                break;
        case HTTP_ERROR_COULDNT_RESOLVE_HOST:
-               DBG("HTTP_ERROR_COULDNT_RESOLVE_HOST");
+               DBG("HTTP_ERROR_COULDNT_RESOLVE_HOST\n");
                break;
        case HTTP_ERROR_COULDNT_CONNECT:
-               DBG("HTTP_ERROR_COULDNT_CONNECT");
+               DBG("HTTP_ERROR_COULDNT_CONNECT\n");
                break;
        case HTTP_ERROR_OPERATION_TIMEDOUT:
-               DBG("HTTP_ERROR_OPERATION_TIMEDOUT");
+               DBG("HTTP_ERROR_OPERATION_TIMEDOUT\n");
                break;
        case HTTP_ERROR_SSL_CONNECT_ERROR:
-               DBG("HTTP_ERROR_SSL_CONNECT_ERROR");
+               DBG("HTTP_ERROR_SSL_CONNECT_ERROR\n");
                break;
        case HTTP_ERROR_CANCELED:
-               DBG("HTTP_ERROR_CANCELED");
+               DBG("HTTP_ERROR_CANCELED\n");
                break;
        default:
-               DBG("Unknown error");
+               DBG("Unknown error\n");
                break;
        }
        cancel = 0;