Ma Shimiao
2014-02-13 09:28:56 UTC
A small fix.
When err is NULL, we should tell user the real error reason.
Signed-off-by: Ma Shimiao <***@cn.fujitsu.com>
---
src/lsm_mgmt.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lsm_mgmt.cpp b/src/lsm_mgmt.cpp
index 694e10a..538fc7e 100644
--- a/src/lsm_mgmt.cpp
+++ b/src/lsm_mgmt.cpp
@@ -121,8 +121,9 @@ static lsmErrorNumber logException(lsmConnect *c, lsmErrorNumber error,
NULL, 0);
if( err ) {
lsmErrorLog(c, err);
+ return error;
}
- return error;
+ return LSM_ERR_NO_MEMORY;
}
static int rpc(lsmConnect *c, const char *method, const Value ¶meters,
When err is NULL, we should tell user the real error reason.
Signed-off-by: Ma Shimiao <***@cn.fujitsu.com>
---
src/lsm_mgmt.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lsm_mgmt.cpp b/src/lsm_mgmt.cpp
index 694e10a..538fc7e 100644
--- a/src/lsm_mgmt.cpp
+++ b/src/lsm_mgmt.cpp
@@ -121,8 +121,9 @@ static lsmErrorNumber logException(lsmConnect *c, lsmErrorNumber error,
NULL, 0);
if( err ) {
lsmErrorLog(c, err);
+ return error;
}
- return error;
+ return LSM_ERR_NO_MEMORY;
}
static int rpc(lsmConnect *c, const char *method, const Value ¶meters,
--
1.8.3.1
1.8.3.1