use proper struct member to get free space 27/65027/3
authorKyeonghun Lee <kh9090.lee@samsung.com>
Thu, 7 Apr 2016 03:00:14 +0000 (12:00 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Thu, 7 Apr 2016 05:38:39 +0000 (14:38 +0900)
Change-Id: I73985279155fcf253160ff20a5b2cab269808d52

manager/CMakeLists.txt
utils/MsgUtilStorage.cpp

index c453cd8..12f2b91 100755 (executable)
@@ -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 "")
index 750d946..7b8de31 100755 (executable)
@@ -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);