summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ipacm/src/IPACM_OffloadManager.cpp8
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 {