diff options
author | Tyler Wear <twear@codeaurora.org> | 2018-06-26 07:50:09 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-06-26 07:50:09 -0700 |
commit | 03e44a691e4fe7b87b8c356919f32b252963854d (patch) | |
tree | 407e80532c3474d933f7efcdca9728dff496790d | |
parent | 23422bada9ef36daebf68d950db3d801ee845cd7 (diff) | |
parent | f22064088b1538509e1f1f8cafd07ca3c13f00c9 (diff) | |
download | ipacfg-mgr-03e44a691e4fe7b87b8c356919f32b252963854d.tar.gz |
ipacm: fix the err_type override issue
am: f22064088b
Change-Id: Ie88da0bc588effb85688b89f26413d43539a3a20
-rw-r--r-- | ipacm/src/IPACM_OffloadManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipacm/src/IPACM_OffloadManager.cpp b/ipacm/src/IPACM_OffloadManager.cpp index 5efe20f..571df8a 100644 --- a/ipacm/src/IPACM_OffloadManager.cpp +++ b/ipacm/src/IPACM_OffloadManager.cpp @@ -573,7 +573,7 @@ RET IPACM_OffloadManager::stopAllOffload() RET IPACM_OffloadManager::setQuota(const char * upstream_name /* upstream */, uint64_t mb/* limit */) { wan_ioctl_set_data_quota quota; - int fd = -1,rc = 0; + int fd = -1, rc = 0, err_type = 0; if ((fd = open(DEVICE_NAME, O_RDWR)) < 0) { @@ -597,10 +597,10 @@ RET IPACM_OffloadManager::setQuota(const char * upstream_name /* upstream */, ui if(rc != 0) { + err_type = errno; close(fd); - IPACMERR("IOCTL WAN_IOCTL_SET_DATA_QUOTA call failed: %s rc: %d\n", strerror(errno),rc); - if (errno == ENODEV) { - IPACMDBG_H("Invalid argument.\n"); + IPACMERR("IOCTL WAN_IOCTL_SET_DATA_QUOTA call failed: %s err_type: %d\n", strerror(errno), err_type); + if (err_type == ENODEV) { return FAIL_UNSUPPORTED; } else { |