diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-04-15 17:26:46 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-04-15 17:26:46 -0700 |
commit | 8b9bf2b5cac4b7c0e147f386247964b01ecc164b (patch) | |
tree | 7405f22153b1f8cc6070074c7076ef650ac09e90 | |
parent | 066f7d5f3857fc5039ee5fced470a887d8c4bf72 (diff) | |
parent | d42712d0fb90465955088b51ee00ad21cabbae13 (diff) | |
download | android_vendor_qcom_opensource_dataservices-8b9bf2b5cac4b7c0e147f386247964b01ecc164b.tar.gz android_vendor_qcom_opensource_dataservices-8b9bf2b5cac4b7c0e147f386247964b01ecc164b.tar.bz2 android_vendor_qcom_opensource_dataservices-8b9bf2b5cac4b7c0e147f386247964b01ecc164b.zip |
Merge "librmnetctl: Fix incorrect handling of messages with return type data"
-rw-r--r-- | rmnetctl/src/librmnetctl.c | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/rmnetctl/src/librmnetctl.c b/rmnetctl/src/librmnetctl.c index b0f98a7..835798e 100644 --- a/rmnetctl/src/librmnetctl.c +++ b/rmnetctl/src/librmnetctl.c @@ -438,8 +438,14 @@ int rmnet_get_network_device_associated(rmnetctl_hndl_t *hndl, != RMNETCTL_SUCCESS) break; - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) + if (_rmnetctl_check_data(response.crd, error_code) + != RMNETCTL_SUCCESS) { + if (_rmnetctl_check_code(response.crd, error_code) + == RMNETCTL_SUCCESS) + return_code = _rmnetctl_set_codes(response.return_code, + error_code); break; + } *register_status = response.return_code; return_code = RMNETCTL_SUCCESS; @@ -517,8 +523,14 @@ int rmnet_get_link_egress_data_format(rmnetctl_hndl_t *hndl, != RMNETCTL_SUCCESS) break; - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) + if (_rmnetctl_check_data(response.crd, error_code) + != RMNETCTL_SUCCESS) { + if (_rmnetctl_check_code(response.crd, error_code) + == RMNETCTL_SUCCESS) + return_code = _rmnetctl_set_codes(response.return_code, + error_code); break; + } *egress_flags = response.data_format.flags; *agg_size = response.data_format.agg_size; @@ -595,8 +607,14 @@ int rmnet_get_link_ingress_data_format_tailspace(rmnetctl_hndl_t *hndl, != RMNETCTL_SUCCESS) break; - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) + if (_rmnetctl_check_data(response.crd, error_code) + != RMNETCTL_SUCCESS) { + if (_rmnetctl_check_code(response.crd, error_code) + == RMNETCTL_SUCCESS) + return_code = _rmnetctl_set_codes(response.return_code, + error_code); break; + } if (ingress_flags) *ingress_flags = response.data_format.flags; @@ -727,8 +745,15 @@ int rmnet_get_logical_ep_config(rmnetctl_hndl_t *hndl, if ((*error_code = rmnetctl_transact(hndl, &request, &response)) != RMNETCTL_SUCCESS) break; - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) + + if (_rmnetctl_check_data(response.crd, error_code) + != RMNETCTL_SUCCESS) { + if (_rmnetctl_check_code(response.crd, error_code) + == RMNETCTL_SUCCESS) + return_code = _rmnetctl_set_codes(response.return_code, + error_code); break; + } str_len = strlcpy(*next_dev, (char *)(response.local_ep_config.next_dev), @@ -819,8 +844,15 @@ int rmnet_get_vnd_name(rmnetctl_hndl_t *hndl, if ((*error_code = rmnetctl_transact(hndl, &request, &response)) != RMNETCTL_SUCCESS) break; - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) + + if (_rmnetctl_check_data(response.crd, error_code) + != RMNETCTL_SUCCESS) { + if (_rmnetctl_check_code(response.crd, error_code) + == RMNETCTL_SUCCESS) + return_code = _rmnetctl_set_codes(response.return_code, + error_code); break; + } str_len = (uint32_t)strlcpy(buf, (char *)(response.vnd.vnd_name), |