update it

This commit is contained in:
Sukchan Lee 2017-04-03 23:12:59 +09:00
parent c8bd136551
commit c48306c3b1
3 changed files with 18 additions and 2 deletions

View File

@ -160,6 +160,13 @@ gtp_xact_t *gtp_xact_remote_create(gtp_xact_ctx_t *context,
status_t gtp_xact_commit(
gtp_xact_t *xact, c_uint8_t type, gtp_message_t *gtp_message)
{
return gtp_xact_associated_commit(xact, NULL, type, gtp_message);
}
status_t gtp_xact_associated_commit(
gtp_xact_t *xact, gtp_xact_t *assoc_xact,
c_uint8_t type, gtp_message_t *gtp_message)
{
status_t rv;
pkbuf_t *pkbuf = NULL;
@ -193,6 +200,12 @@ status_t gtp_xact_commit(
d_assert(gtp_send(xact->sock, xact->gnode, xact->pkbuf) == CORE_OK,
goto out, "gtp_send error");
if (assoc_xact)
{
xact->assoc_xact = assoc_xact;
assoc_xact->assoc_xact = xact;
}
return CORE_OK;
out:

View File

@ -57,6 +57,9 @@ CORE_DECLARE(gtp_xact_t *) gtp_xact_remote_create(gtp_xact_ctx_t *context,
CORE_DECLARE(status_t) gtp_xact_commit(
gtp_xact_t *xact, c_uint8_t type, gtp_message_t *gtp_message);
CORE_DECLARE(status_t) gtp_xact_associated_commit(
gtp_xact_t *xact, gtp_xact_t *assoc_xact,
c_uint8_t type, gtp_message_t *gtp_message);
CORE_DECLARE(status_t) gtp_xact_timeout(gtp_xact_t *xact);
CORE_DECLARE(gtp_xact_t *) gtp_xact_preprocess(gtp_xact_ctx_t *context,

View File

@ -165,8 +165,8 @@ status_t sgw_s5c_send_to_pgw(
sgw_self()->s5c_sock, &sgw_self()->s5c_node);
d_assert(xact, return CORE_ERROR, "Null param");
xact->assoc_xact = assoc_xact;
d_assert(gtp_xact_commit(xact, type, gtp_message) == CORE_OK,
d_assert(gtp_xact_associated_commit(
xact, assoc_xact, type, gtp_message) == CORE_OK,
return CORE_ERROR, "gtp_send error");
return CORE_OK;