Commit dd96525d authored by Slava Monich's avatar Slava Monich

[mms_codec] Always allow X-Mms-Transaction-ID header. Fixes MER#1676

DNA Finland recently started to include X-Mms-Transaction-ID in
M-Delivery.ind even though it's not supposed to be there at all.
We should allow (and ignore) it.
parent 3defd0f6
......@@ -1083,8 +1083,11 @@ static gboolean mms_parse_headers(struct wsp_header_iter *iter,
continue;
/* Unsupported header, skip */
if (entries[h].data == NULL)
if (entries[h].data == NULL) {
entries[h].pos = i;
entries[h].flags |= HEADER_FLAG_MARKED;
continue;
}
/* Skip multiply present headers unless explicitly requested */
if ((entries[h].flags & HEADER_FLAG_MARKED) &&
......@@ -1195,7 +1198,9 @@ static gboolean decode_acknowledge_ind(struct wsp_header_iter *iter,
static gboolean decode_delivery_ind(struct wsp_header_iter *iter,
struct mms_message *out)
{
return mms_parse_headers(iter, MMS_HEADER_MMS_VERSION,
return mms_parse_headers(iter, MMS_HEADER_TRANSACTION_ID,
HEADER_FLAG_PRESET_POS, NULL,
MMS_HEADER_MMS_VERSION,
HEADER_FLAG_MANDATORY | HEADER_FLAG_PRESET_POS,
&out->version,
MMS_HEADER_MESSAGE_ID,
......@@ -1212,7 +1217,9 @@ static gboolean decode_delivery_ind(struct wsp_header_iter *iter,
static gboolean decode_read_ind(struct wsp_header_iter *iter,
struct mms_message *out)
{
return mms_parse_headers(iter, MMS_HEADER_MMS_VERSION,
return mms_parse_headers(iter, MMS_HEADER_TRANSACTION_ID,
HEADER_FLAG_PRESET_POS, NULL,
MMS_HEADER_MMS_VERSION,
HEADER_FLAG_MANDATORY | HEADER_FLAG_PRESET_POS,
&out->version,
MMS_HEADER_MESSAGE_ID,
......
......@@ -60,7 +60,8 @@ int main(int argc, char* argv[])
"m-notification_2.ind",
"m-notification_3.ind",
"m-notification_4.ind",
"m-delivery.ind",
"m-delivery_1.ind",
"m-delivery_2.ind",
"m-read-orig.ind",
"m-retrieve_1.conf",
"m-retrieve_2.conf",
......
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