X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fconnection_mptcp.c;h=3d4456794dd9db565bdf5dcd171f8ecced632e58;hb=3b04e6c4e6b4a4b01a705f4396d3483de1d3eb56;hp=e101e4182a51bb2d9d095f9b54ad8580fcac3cca;hpb=ad7173cfd201cd407a594c0023a732452569035c;p=platform%2Fcore%2Fapi%2Fconnection.git diff --git a/src/connection_mptcp.c b/src/connection_mptcp.c index e101e41..3d44567 100755 --- a/src/connection_mptcp.c +++ b/src/connection_mptcp.c @@ -30,16 +30,16 @@ EXPORT_API int connection_mptcp_is_supported(connection_h connection, bool* supp return CONNECTION_ERROR_INVALID_PARAMETER; } - *supported = _connection_libnet_mptcp_supported(); + *supported = _connection_libnet_mptcp_supported(connection); return CONNECTION_ERROR_NONE; } EXPORT_API int connection_mptcp_enable(connection_h connection, connection_mptcp_enable_e enable) { // check MPTCP support - if (_connection_libnet_mptcp_supported() == FALSE) { - CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); - return CONNECTION_ERROR_NOT_SUPPORTED; + if (_connection_libnet_mptcp_supported(connection) == FALSE) { + CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } if (!(_connection_check_handle_validity(connection))) { @@ -49,19 +49,19 @@ EXPORT_API int connection_mptcp_enable(connection_h connection, connection_mptcp if (enable <= CONNECTION_MPTCP_DISABLE || enable > CONNECTION_MPTCP_ENABLE_SOCKOPT) { - CONNECTION_LOG(CONNECTION_ERROR, "Use connection_mptcp_disable()"); - return CONNECTION_ERROR_INVALID_PARAMETER; + CONNECTION_LOG(CONNECTION_ERROR, "Use connection_mptcp_disable()"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE } - return _connection_libnet_mptcp_enable(enable); + return _connection_libnet_mptcp_enable(connection, enable); } EXPORT_API int connection_mptcp_disable(connection_h connection) { // check MPTCP support - if (_connection_libnet_mptcp_supported() == FALSE) { - CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); - return CONNECTION_ERROR_NOT_SUPPORTED; + if (_connection_libnet_mptcp_supported(connection) == FALSE) { + CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } if (!(_connection_check_handle_validity(connection))) { @@ -69,15 +69,15 @@ EXPORT_API int connection_mptcp_disable(connection_h connection) return CONNECTION_ERROR_INVALID_PARAMETER; } - return _connection_libnet_mptcp_enable(CONNECTION_MPTCP_DISABLE); + return _connection_libnet_mptcp_enable(connection, CONNECTION_MPTCP_DISABLE); } EXPORT_API int connection_mptcp_get_enabled(connection_h connection, connection_mptcp_enable_e* enable) { // check MPTCP support - if (_connection_libnet_mptcp_supported() == FALSE) { - CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); - return CONNECTION_ERROR_NOT_SUPPORTED; + if (_connection_libnet_mptcp_supported(connection) == FALSE) { + CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } if (!(_connection_check_handle_validity(connection))) { @@ -86,20 +86,20 @@ EXPORT_API int connection_mptcp_get_enabled(connection_h connection, connection_ } if (enable == NULL) { - CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter"); - return CONNECTION_ERROR_INVALID_PARAMETER; + CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE } - return _connection_libnet_mptcp_get_enabled(enable); + return _connection_libnet_mptcp_get_enabled(connection, enable); } EXPORT_API int connection_mptcp_set_path_manager(connection_h connection, connection_mptcp_path_manager_e pm) { // check MPTCP support - if (_connection_libnet_mptcp_supported() == FALSE) { - CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); - return CONNECTION_ERROR_NOT_SUPPORTED; + if (_connection_libnet_mptcp_supported(connection) == FALSE) { + CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } if (!(_connection_check_handle_validity(connection))) { @@ -107,15 +107,15 @@ EXPORT_API int connection_mptcp_set_path_manager(connection_h connection, connec return CONNECTION_ERROR_INVALID_PARAMETER; } - return _connection_libnet_mptcp_set_path_manager(pm); + return _connection_libnet_mptcp_set_path_manager(connection, pm); } EXPORT_API int connection_mptcp_get_path_manager(connection_h connection, connection_mptcp_path_manager_e* pm) { // check MPTCP support - if (_connection_libnet_mptcp_supported() == FALSE) { - CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); - return CONNECTION_ERROR_NOT_SUPPORTED; + if (_connection_libnet_mptcp_supported(connection) == FALSE) { + CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } if (!(_connection_check_handle_validity(connection))) { @@ -128,16 +128,16 @@ EXPORT_API int connection_mptcp_get_path_manager(connection_h connection, connec return CONNECTION_ERROR_INVALID_PARAMETER; } - return _connection_libnet_mptcp_get_path_manager(pm); + return _connection_libnet_mptcp_get_path_manager(connection, pm); } EXPORT_API int connection_mptcp_set_scheduler(connection_h connection, connection_mptcp_scheduler_e scheduler) { // check MPTCP support - if (_connection_libnet_mptcp_supported() == FALSE) { - CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); - return CONNECTION_ERROR_NOT_SUPPORTED; + if (_connection_libnet_mptcp_supported(connection) == FALSE) { + CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } if (!(_connection_check_handle_validity(connection))) { @@ -145,15 +145,15 @@ EXPORT_API int connection_mptcp_set_scheduler(connection_h connection, connectio return CONNECTION_ERROR_INVALID_PARAMETER; } - return _connection_libnet_mptcp_set_scheduler(scheduler); + return _connection_libnet_mptcp_set_scheduler(connection, scheduler); } EXPORT_API int connection_mptcp_get_scheduler(connection_h connection, connection_mptcp_scheduler_e* scheduler) { // check MPTCP support - if (_connection_libnet_mptcp_supported() == FALSE) { - CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); - return CONNECTION_ERROR_NOT_SUPPORTED; + if (_connection_libnet_mptcp_supported(connection) == FALSE) { + CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE + return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } if (!(_connection_check_handle_validity(connection))) { @@ -166,7 +166,7 @@ EXPORT_API int connection_mptcp_get_scheduler(connection_h connection, connectio return CONNECTION_ERROR_INVALID_PARAMETER; } - return _connection_libnet_mptcp_get_scheduler(scheduler); + return _connection_libnet_mptcp_get_scheduler(connection, scheduler); }