summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonYoung Choi <wy80.choi@samsung.com>2012-08-29 17:05:53 +0900
committerWonYoung Choi <wy80.choi@samsung.com>2012-08-29 17:05:53 +0900
commita98d1b4ce380ae9ceca278403a681c0b253e3932 (patch)
treeddb75ad560034568fefd8afdad466f12ca19328e
parentcce2a4fe5083875792da0be45dc94db83fab8612 (diff)
downloadmessages-a98d1b4ce380ae9ceca278403a681c0b253e3932.tar.gz
messages-a98d1b4ce380ae9ceca278403a681c0b253e3932.tar.bz2
messages-a98d1b4ce380ae9ceca278403a681c0b253e3932.zip
Fix to support email address as a recipient.
-rw-r--r--packaging/capi-messaging-messages.spec2
-rw-r--r--src/messages.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/packaging/capi-messaging-messages.spec b/packaging/capi-messaging-messages.spec
index ba35126..79c4b14 100644
--- a/packaging/capi-messaging-messages.spec
+++ b/packaging/capi-messaging-messages.spec
@@ -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
diff --git a/src/messages.c b/src/messages.c
index 66e55f3..cd89d6f 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -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