[Messaging] Restore function used to set mimeType.
authorTomasz Marciniak <t.marciniak@samsung.com>
Thu, 19 Mar 2015 14:06:57 +0000 (15:06 +0100)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Fri, 20 Mar 2015 08:12:20 +0000 (17:12 +0900)
[Verification] Code compiles without errors.

Change-Id: I8485f7fca3b26b4ee40ee33fe75da7c823b4f89d
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
(cherry picked from commit 3ba5663281a25a3fc8f3bd18543fd407174fd96e)

src/messaging/message.cc

index 2114cd7db4949e602f860c277c5295c7aefc90bf..980f4fc2f08e40f110a4c56f606bc7496b39dbc8 100644 (file)
@@ -746,7 +746,9 @@ void Message::addMMSBodyAndAttachmentsToStruct(const AttachmentPtrVector attach,
                 unsigned int type = MessageAttachment::MIMETypeStringToEnum(
                         attach.at(i)->getMimeType());
                 msg_set_int_value(tmpAtt, MSG_MMS_ATTACH_MIME_TYPE_INT, type);
-
+                msg_set_str_value(tmpAtt, MSG_MMS_ATTACH_CONTENT_TYPE_STR,
+                                  const_cast<char*>(attach.at(i)->getMimeType().c_str()),
+                                  MSG_MSG_ID_LEN);
 
                 LoggerD("att[%d]: setting mime type:0x%x (orignal:%s)", i, type,
                     attach.at(i)->getMimeType().c_str());
@@ -908,6 +910,8 @@ msg_struct_t Message::convertPlatformShortMessageToStruct(Message* message,
                 LoggerE("Message(%p): Failed to set mms body filepath", message);
                 throw common::UnknownException("Failed to set mms body filepath");
             }
+            msg_set_str_value(media, MSG_MMS_MEDIA_CONTENT_TYPE_STR,
+                              "text/plain", 10);
 
             //----------------------------------------------------------------------------
             //Smile text