msuraev has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/29284 )
Change subject: SIGTRAN: arrange the comments in the encoder to match the spec ......................................................................
SIGTRAN: arrange the comments in the encoder to match the spec
Related: OS#5579 Change-Id: Ib986137057856afb8725541d912db210a9a46294 --- M src/sccp_scoc.c 1 file changed, 8 insertions(+), 4 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c index 3b1ca02..2ed72ee 100644 --- a/src/sccp_scoc.c +++ b/src/sccp_scoc.c @@ -596,10 +596,12 @@ /* optional: sequence number (class 3 only) */ if (conn->calling_addr.presence) xua_msg_add_sccp_addr(xua, SUA_IEI_SRC_ADDR, &conn->calling_addr); - /* optional: hop count; importance; priority; credit */ + /* optional: data */ if (prim && msgb_l2(prim->oph.msg) && msgb_l2len(prim->oph.msg)) xua_msg_add_data(xua, SUA_IEI_DATA, msgb_l2len(prim->oph.msg), msgb_l2(prim->oph.msg)); + /* optional: hop count */ + /* optional: importance */ break; case SUA_CO_COAK: /* Connect Acknowledge == SCCP CC */ xua->hdr = XUA_HDR(SUA_MSGC_CO, SUA_CO_COAK); @@ -617,9 +619,11 @@ * parameter */ if (conn->calling_addr.presence) xua_msg_add_sccp_addr(xua, SUA_IEI_DEST_ADDR, &conn->calling_addr); + /* optional: data */ if (prim && msgb_l2(prim->oph.msg) && msgb_l2len(prim->oph.msg)) xua_msg_add_data(xua, SUA_IEI_DATA, msgb_l2len(prim->oph.msg), msgb_l2(prim->oph.msg)); + /* optional: importance */ break; case SUA_CO_RELRE: /* Release Request == SCCP RLSD */ if (!prim) @@ -629,17 +633,17 @@ xua_msg_add_u32(xua, SUA_IEI_DEST_REF, conn->remote_ref); xua_msg_add_u32(xua, SUA_IEI_SRC_REF, conn->conn_id); xua_msg_add_u32(xua, SUA_IEI_CAUSE, SUA_CAUSE_T_RELEASE | prim->u.disconnect.cause); - /* optional: importance */ + /* optional: data */ if (prim && msgb_l2(prim->oph.msg) && msgb_l2len(prim->oph.msg)) xua_msg_add_data(xua, SUA_IEI_DATA, msgb_l2len(prim->oph.msg), msgb_l2(prim->oph.msg)); + /* optional: importance */ break; case SUA_CO_RELCO: /* Release Confirm == SCCP RLC */ xua->hdr = XUA_HDR(SUA_MSGC_CO, SUA_CO_RELCO); xua_msg_add_u32(xua, SUA_IEI_ROUTE_CTX, conn->inst->route_ctx); xua_msg_add_u32(xua, SUA_IEI_DEST_REF, conn->remote_ref); xua_msg_add_u32(xua, SUA_IEI_SRC_REF, conn->conn_id); - /* optional: importance */ break; case SUA_CO_CODT: /* Connection Oriented Data Transfer == SCCP DT1 */ if (!prim) @@ -672,11 +676,11 @@ /* conditional: dest addr */ if (conn->calling_addr.presence) xua_msg_add_sccp_addr(xua, SUA_IEI_DEST_ADDR, &conn->calling_addr); - /* optional: importance */ /* optional: data */ if (prim && msgb_l2(prim->oph.msg) && msgb_l2len(prim->oph.msg)) xua_msg_add_data(xua, SUA_IEI_DATA, msgb_l2len(prim->oph.msg), msgb_l2(prim->oph.msg)); + /* optional: importance */ break; /* FIXME */ default: