Commit 2c9bb471 authored by Slava Monich's avatar Slava Monich

Merge pull request #29 from monich/service-denied

[mms-lib] Only report status REFUSED for errors 225, 229 and 235
parents bbb8ca2a 0ab4a7c3
...@@ -81,7 +81,15 @@ mms_task_send_done( ...@@ -81,7 +81,15 @@ mms_task_send_done(
} }
} else { } else {
MMS_ERR("MMSC responded with %u", pdu->sc.rsp_status); MMS_ERR("MMSC responded with %u", pdu->sc.rsp_status);
state = MMS_SEND_STATE_REFUSED; switch (pdu->sc.rsp_status) {
case MMS_MESSAGE_RSP_STATUS_ERR_PERM_SERVICE_DENIED:
case MMS_MESSAGE_RSP_STATUS_ERR_PERM_LACK_OF_PREPAID:
case MMS_MESSAGE_RSP_STATUS_ERR_PERM_CONTENT_NOT_ACCEPTED:
state = MMS_SEND_STATE_REFUSED;
break;
default:
break;
}
} }
} else { } else {
MMS_ERR("Unexpected response from MMSC"); MMS_ERR("Unexpected response from MMSC");
......
...@@ -122,7 +122,7 @@ static const TestDesc send_tests[] = { ...@@ -122,7 +122,7 @@ static const TestDesc send_tests[] = {
MMS_SEND_STATE_SENDING, MMS_SEND_STATE_SENDING,
"TestMessageId" "TestMessageId"
},{ },{
"Reject", "ServiceDenied",
ATTACHMENTS(test_files_reject), ATTACHMENTS(test_files_reject),
"Rejection test", "Rejection test",
"+1234567890", "+1234567890",
...@@ -135,6 +135,20 @@ static const TestDesc send_tests[] = { ...@@ -135,6 +135,20 @@ static const TestDesc send_tests[] = {
SOUP_STATUS_OK, SOUP_STATUS_OK,
MMS_SEND_STATE_REFUSED, MMS_SEND_STATE_REFUSED,
NULL NULL
},{
"Failure",
ATTACHMENTS(test_files_reject),
"Failure test",
"+1234567890",
NULL,
NULL,
NULL,
0,
"m-send.conf",
MMS_CONTENT_TYPE,
SOUP_STATUS_OK,
MMS_SEND_STATE_SEND_ERROR,
NULL
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment