Commit 739fd2da authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Fixed OER encoding of unbound mandatory fields in RT2 (bug 560347)



Change-Id: I51ffbe256e52ff0b7a45fb4386946dc270ca1e2f
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent eef9b476
......@@ -6421,7 +6421,7 @@ int Record_Type::OER_encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_bu
if (is_default_field) {
next_default_idx++;
}
if (get_at(p_td.oer->p[i])->is_present() &&
if ((!get_at(p_td.oer->p[i])->is_optional() || get_at(p_td.oer->p[i])->is_present()) &&
(!is_default_field || !get_at(p_td.oer->p[i])->is_equal(default_value))) {
get_at(p_td.oer->p[i])->OER_encode(*fld_descr(p_td.oer->p[i]), p_buf);
}
......@@ -6543,7 +6543,7 @@ int Record_Type::OER_encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_bu
if (is_default_field) {
next_default_idx++;
}
if (get_at(p_td.oer->p[j])->is_present() &&
if ((!get_at(p_td.oer->p[j])->is_optional() || get_at(p_td.oer->p[j])->is_present()) &&
(!is_default_field || !get_at(p_td.oer->p[j])->is_equal(default_value))) {
get_at(p_td.oer->p[j])->OER_encode(*fld_descr(p_td.oer->p[j]), tmp_buf);
}
......
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