summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/capi-messaging-messages.spec2
-rw-r--r--src/messages.c7
-rw-r--r--test/messages_send_mms_test.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/packaging/capi-messaging-messages.spec b/packaging/capi-messaging-messages.spec
index 234a63c..ba35126 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: 11
+Release: 12
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
diff --git a/src/messages.c b/src/messages.c
index 3b648b2..66e55f3 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -103,6 +103,7 @@ int messages_close_service(messages_service_h svc)
int ret;
messages_service_s *_svc = (messages_service_s *)svc;
+ CHECK_NULL(_svc);
ret = msg_close_msg_handle(&_svc->service_h);
@@ -209,7 +210,7 @@ int messages_get_message_type(messages_message_h msg, messages_message_type_e *t
CHECK_NULL(_msg);
CHECK_NULL(_msg->msg_h);
CHECK_NULL(type);
-
+
ret = msg_get_int_value(_msg->msg_h, MSG_MESSAGE_TYPE_INT, &msgType);
if (ret != MSG_SUCCESS)
{
@@ -395,7 +396,7 @@ int messages_remove_all_addresses(messages_message_h msg)
CHECK_NULL(_msg->msg_h);
ret = msg_get_list_handle(_msg->msg_h, MSG_MESSAGE_ADDR_LIST_STRUCT, (void **)&addr_list);
- if (MSG_SUCCESS != ret)
+ if (MSG_SUCCESS == ret)
{
addr_list->nCount = 0;
}
@@ -428,7 +429,6 @@ int messages_send_message(messages_service_h svc, messages_message_h msg, bool s
CHECK_NULL(_msg);
CHECK_NULL(_msg->msg_h);
-
sendOpt = msg_create_struct(MSG_STRUCT_SENDOPT);
msg_set_bool_value(sendOpt, MSG_SEND_OPT_SETTING_BOOL, true);
msg_set_bool_value(sendOpt, MSG_SEND_OPT_DELIVER_REQ_BOOL, false);
@@ -946,6 +946,7 @@ int messages_get_text(messages_message_h msg, char **text)
messages_message_s *_msg = (messages_message_s*)msg;
CHECK_NULL(_msg);
CHECK_NULL(_msg->msg_h);
+ CHECK_NULL(text);
ret = messages_get_message_type(msg, &type);
if (MESSAGES_ERROR_NONE != ret) {
diff --git a/test/messages_send_mms_test.c b/test/messages_send_mms_test.c
index 52c396c..76c0aa8 100644
--- a/test/messages_send_mms_test.c
+++ b/test/messages_send_mms_test.c
@@ -34,8 +34,8 @@ int main(int argc, char *argv[])
messages_set_text(msg, "This is a multi-media message!");
messages_mms_set_subject(msg, "TEST!");
- messages_mms_add_attachment(msg, MESSAGES_MEDIA_VIDEO, "/opt/etc/msg-service/V091120_104905.3gp");
- messages_mms_add_attachment(msg, MESSAGES_MEDIA_IMAGE, "/opt/etc/msg-service/P091120_104633.jpg");
+// messages_mms_add_attachment(msg, MESSAGES_MEDIA_VIDEO, "/opt/etc/msg-service/V091120_104905.3gp");
+// messages_mms_add_attachment(msg, MESSAGES_MEDIA_IMAGE, "/opt/etc/msg-service/P091120_104633.jpg");
printf("Before Sending\n");