[Messaging] Fixed handling wrong message types to ignore unknown
authorPiotr Kosko <p.kosko@samsung.com>
Tue, 21 Jul 2015 07:56:27 +0000 (09:56 +0200)
committerPiotr Kosko <p.kosko@samsung.com>
Tue, 21 Jul 2015 07:56:42 +0000 (09:56 +0200)
[Verification] TCT SMS 100%, MMS 100% on binary Z130HDDE0COG2

Change-Id: Ie6fb11ca67c8d0fe420fc71e9c3faa2d001976ff
Signed-off-by: Piotr Kosko <p.kosko@samsung.com>
src/messaging/short_message_manager.cc

index 8f1674b081916cf77e118f8fcdef8e1ee2eb245f..0e31e46fd81c79f6c02f9532709a31f9a1d21152 100755 (executable)
@@ -1006,6 +1006,10 @@ void ShortMsgManager::findMessages(FindMsgCallbackUserData* callback)
                 Message* message = nullptr;
                 PlatformResult ret = Message::convertPlatformShortMessageToObject(msg, &message);
                 if (ret.IsError()) {
+                    if (ErrorCode::INVALID_VALUES_ERR == ret.error_code()) {
+                      LoggerW("Ignore messages with not supported/unrecognized type");
+                      continue;
+                    }
                     LoggerE("Cannot get platform Message structure");
                     callback->SetError(PlatformResult(ErrorCode::UNKNOWN_ERR, "Cannot get platform Message structure"));
                     break;