Fix to support email address as a recipient.
authorWonYoung Choi <wy80.choi@samsung.com>
Wed, 29 Aug 2012 08:05:53 +0000 (17:05 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Wed, 29 Aug 2012 08:05:53 +0000 (17:05 +0900)
packaging/capi-messaging-messages.spec
src/messages.c

index ba35126f713e45143ca8edd0176c133718ce33d9..79c4b14e7e8a0da206fda50e16fdff6af42c11a5 100644 (file)
@@ -1,7 +1,7 @@
 Name:       capi-messaging-messages
 Summary:    A SMS/MMS library in Tizen Native API
 Version: 0.1.0
-Release:    12
+Release:    13
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 BuildRequires:  cmake
index 66e55f378aaa9c42c2d510d43f8e3e28cc6b8a1f..cd89d6f02173bbaba22f299a88deef6b1dc23779 100644 (file)
@@ -270,7 +270,14 @@ int messages_add_address(messages_message_h msg, const char *address, messages_r
        }
        else if (MSG_TYPE_MMS == msgType)
        {
-               msg_set_int_value(addr_info, MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+               if (strchr(address, '@') == NULL)
+               {
+                       msg_set_int_value(addr_info, MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+               }
+               else
+               {
+                       msg_set_int_value(addr_info, MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_EMAIL);
+               }
                msg_set_int_value(addr_info, MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT, _messages_convert_recipient_to_fw(type));
        }
        else