summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyeonghun Lee <kh9090.lee@samsung.com>2016-04-07 12:00:14 +0900
committerKyeonghun Lee <kh9090.lee@samsung.com>2016-04-07 14:38:39 +0900
commit48300ed2016b08d4057db401b6d05d79aa4c1117 (patch)
treefbf87927b6d36bf8d816938c180f1d7c5ad700df
parentd4269618d026d6359a1a9a7b3b12a9e6cf41d429 (diff)
downloadmsg-service-48300ed2016b08d4057db401b6d05d79aa4c1117.tar.gz
msg-service-48300ed2016b08d4057db401b6d05d79aa4c1117.tar.bz2
msg-service-48300ed2016b08d4057db401b6d05d79aa4c1117.zip
use proper struct member to get free space
Change-Id: I73985279155fcf253160ff20a5b2cab269808d52
-rwxr-xr-xmanager/CMakeLists.txt4
-rwxr-xr-xutils/MsgUtilStorage.cpp10
2 files changed, 5 insertions, 9 deletions
diff --git a/manager/CMakeLists.txt b/manager/CMakeLists.txt
index c453cd8..12f2b91 100755
--- a/manager/CMakeLists.txt
+++ b/manager/CMakeLists.txt
@@ -4,10 +4,6 @@ SET(MSG-MGR-PKGNAME org.tizen.msg-manager)
ADD_DEFINITIONS("-D_FILE_OFFSET_BITS=64")
-IF(_WEARABLE_PROFILE)
- ADD_DEFINITIONS("-DMSG_MGR_WEARABLE_PROFILE")
-ENDIF(_WEARABLE_PROFILE)
-
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
diff --git a/utils/MsgUtilStorage.cpp b/utils/MsgUtilStorage.cpp
index 750d946..7b8de31 100755
--- a/utils/MsgUtilStorage.cpp
+++ b/utils/MsgUtilStorage.cpp
@@ -202,11 +202,11 @@ msg_error_t MsgStoCheckMsgCntFull(MsgDbHandler *pDbHandle, const MSG_MESSAGE_TYP
MSG_ERR("Faile to get space info [%s]", ec.message().c_str());
return MSG_ERR_STORAGE_ERROR;
} else {
- MSG_DEBUG("Free space of storage is [%llu] MB.", si.free);
+ MSG_DEBUG("Free space of storage is [%llu] Bytes.", si.available);
- if (si.free < SMS_MINIMUM_SPACE && pMsgType->mainType == MSG_SMS_TYPE)
+ if (si.available < SMS_MINIMUM_SPACE && pMsgType->mainType == MSG_SMS_TYPE)
err = MSG_ERR_MESSAGE_COUNT_FULL;
- else if (si.free < MMS_MINIMUM_SPACE && pMsgType->mainType == MSG_MMS_TYPE)
+ else if (si.available < MMS_MINIMUM_SPACE && pMsgType->mainType == MSG_MMS_TYPE)
err = MSG_ERR_MESSAGE_COUNT_FULL;
}
@@ -354,9 +354,9 @@ msg_error_t MsgStocheckMemoryStatus()
return MSG_ERR_STORAGE_ERROR;
}
- MSG_DEBUG("Free space of storage is [%llu] MB.", si.free);
+ MSG_DEBUG("Free space of storage is [%llu] Bytes.", si.available);
- if (si.free < SMS_MINIMUM_SPACE)
+ if (si.available < SMS_MINIMUM_SPACE)
err = MSG_ERR_MESSAGE_COUNT_FULL;
MSG_DEBUG("Memory status =[%d]", err);