aboutsummaryrefslogtreecommitdiff
path: root/data-ipa-cfg-mgr/ipacm/src/IPACM_Header.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'data-ipa-cfg-mgr/ipacm/src/IPACM_Header.cpp')
-rw-r--r--data-ipa-cfg-mgr/ipacm/src/IPACM_Header.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/data-ipa-cfg-mgr/ipacm/src/IPACM_Header.cpp b/data-ipa-cfg-mgr/ipacm/src/IPACM_Header.cpp
index 5e56a49..c77c69c 100644
--- a/data-ipa-cfg-mgr/ipacm/src/IPACM_Header.cpp
+++ b/data-ipa-cfg-mgr/ipacm/src/IPACM_Header.cpp
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -203,7 +203,7 @@ bool IPACM_Header::AddHeaderProcCtx(struct ipa_ioc_add_hdr_proc_ctx* pHeader)
int ret = 0;
//call the Driver ioctl to add header processing context
ret = ioctl(m_fd, IPA_IOC_ADD_HDR_PROC_CTX, pHeader);
- return (ret != -1);
+ return (ret == 0);
}
bool IPACM_Header::DeleteHeaderProcCtx(uint32_t hdl)
@@ -225,7 +225,12 @@ bool IPACM_Header::DeleteHeaderProcCtx(uint32_t hdl)
pHeaderTable->hdl[0].hdl = hdl;
ret = ioctl(m_fd, IPA_IOC_DEL_HDR_PROC_CTX, pHeaderTable);
+ if(ret != 0)
+ {
+ IPACMERR("Failed to delete hdr proc ctx: return value %d, status %d\n",
+ ret, pHeaderTable->hdl[0].status);
+ }
free(pHeaderTable);
- return (ret != -1);
+ return (ret == 0);
}