From eeb5ad9545621700c96320436485e5c27fffca11 Mon Sep 17 00:00:00 2001 From: Denis Dolzhenko Date: Thu, 27 Oct 2016 18:35:16 +0300 Subject: [PATCH] Fixed: getSize() for MMS Change-Id: I7f30f06e2f4c691e49df6ef866a9d0a60cae253f Signed-off-by: Denis Dolzhenko --- src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp b/src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp index 468620ca..554f27cc 100644 --- a/src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp +++ b/src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp @@ -168,6 +168,8 @@ time_t MessageMmsPrivate::getExpired() const int MessageMmsPrivate::getSize() const { int msgSize = 0; - msg_get_int_value(m_MmsStruct, MSG_MMS_HEADER_SIZE_INT, &msgSize); // Size in bytes + int res = msg_get_int_value(m_MmsStruct, MSG_MMS_HEADER_SIZE_INT, &msgSize); // Size in bytes + if(res != MSG_SUCCESS || msgSize <= 0) + msgSize = MessagePrivate::getSize(); return msgSize; } -- 2.34.1