forked from acouzens/open5gs
[GTP/PFCP] Follow-up on #2073
This commit is contained in:
parent
d30fcbb848
commit
b80db453e8
|
@ -443,7 +443,6 @@ int ogs_gtp_xact_update_tx(ogs_gtp_xact_t *xact,
|
||||||
|
|
||||||
static int ogs_gtp_xact_update_rx(ogs_gtp_xact_t *xact, uint8_t type)
|
static int ogs_gtp_xact_update_rx(ogs_gtp_xact_t *xact, uint8_t type)
|
||||||
{
|
{
|
||||||
int rv = OGS_OK;
|
|
||||||
char buf[OGS_ADDRSTRLEN];
|
char buf[OGS_ADDRSTRLEN];
|
||||||
ogs_gtp_xact_stage_t stage;
|
ogs_gtp_xact_stage_t stage;
|
||||||
|
|
||||||
|
@ -491,8 +490,7 @@ static int ogs_gtp_xact_update_rx(ogs_gtp_xact_t *xact, uint8_t type)
|
||||||
OGS_ADDR(&xact->gnode->addr,
|
OGS_ADDR(&xact->gnode->addr,
|
||||||
buf),
|
buf),
|
||||||
OGS_PORT(&xact->gnode->addr));
|
OGS_PORT(&xact->gnode->addr));
|
||||||
rv = ogs_gtp_sendto(xact->gnode, pkbuf);
|
ogs_expect(OGS_OK == ogs_gtp_sendto(xact->gnode, pkbuf));
|
||||||
ogs_expect(rv == OGS_OK);
|
|
||||||
} else {
|
} else {
|
||||||
ogs_warn("[%d] %s Request Duplicated. Discard!"
|
ogs_warn("[%d] %s Request Duplicated. Discard!"
|
||||||
" for step %d type %d peer [%s]:%d",
|
" for step %d type %d peer [%s]:%d",
|
||||||
|
@ -557,8 +555,7 @@ static int ogs_gtp_xact_update_rx(ogs_gtp_xact_t *xact, uint8_t type)
|
||||||
OGS_ADDR(&xact->gnode->addr,
|
OGS_ADDR(&xact->gnode->addr,
|
||||||
buf),
|
buf),
|
||||||
OGS_PORT(&xact->gnode->addr));
|
OGS_PORT(&xact->gnode->addr));
|
||||||
rv = ogs_gtp_sendto(xact->gnode, pkbuf);
|
ogs_expect(OGS_OK == ogs_gtp_sendto(xact->gnode, pkbuf));
|
||||||
ogs_expect(rv == OGS_OK);
|
|
||||||
} else {
|
} else {
|
||||||
ogs_warn("[%d] %s Request Duplicated. Discard!"
|
ogs_warn("[%d] %s Request Duplicated. Discard!"
|
||||||
" for step %d type %d peer [%s]:%d",
|
" for step %d type %d peer [%s]:%d",
|
||||||
|
@ -726,11 +723,7 @@ int ogs_gtp_xact_commit(ogs_gtp_xact_t *xact)
|
||||||
pkbuf = xact->seq[xact->step-1].pkbuf;
|
pkbuf = xact->seq[xact->step-1].pkbuf;
|
||||||
ogs_assert(pkbuf);
|
ogs_assert(pkbuf);
|
||||||
|
|
||||||
if (ogs_gtp_sendto(xact->gnode, pkbuf) != OGS_OK) {
|
ogs_expect(OGS_OK == ogs_gtp_sendto(xact->gnode, pkbuf));
|
||||||
ogs_error("ogs_gtp_sendto() failed");
|
|
||||||
ogs_gtp_xact_delete(xact);
|
|
||||||
return OGS_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
return OGS_OK;
|
return OGS_OK;
|
||||||
}
|
}
|
||||||
|
@ -761,10 +754,7 @@ static void response_timeout(void *data)
|
||||||
pkbuf = xact->seq[xact->step-1].pkbuf;
|
pkbuf = xact->seq[xact->step-1].pkbuf;
|
||||||
ogs_assert(pkbuf);
|
ogs_assert(pkbuf);
|
||||||
|
|
||||||
if (ogs_gtp_sendto(xact->gnode, pkbuf) != OGS_OK) {
|
ogs_expect(OGS_OK == ogs_gtp_sendto(xact->gnode, pkbuf));
|
||||||
ogs_error("ogs_gtp_sendto() failed");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
ogs_warn("[%d] %s No Reponse. Give up! "
|
ogs_warn("[%d] %s No Reponse. Give up! "
|
||||||
"for step %d type %d peer [%s]:%d",
|
"for step %d type %d peer [%s]:%d",
|
||||||
|
@ -779,11 +769,6 @@ static void response_timeout(void *data)
|
||||||
|
|
||||||
ogs_gtp_xact_delete(xact);
|
ogs_gtp_xact_delete(xact);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
out:
|
|
||||||
ogs_gtp_xact_delete(xact);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void holding_timeout(void *data)
|
static void holding_timeout(void *data)
|
||||||
|
|
|
@ -286,7 +286,6 @@ int ogs_pfcp_xact_update_tx(ogs_pfcp_xact_t *xact,
|
||||||
|
|
||||||
static int ogs_pfcp_xact_update_rx(ogs_pfcp_xact_t *xact, uint8_t type)
|
static int ogs_pfcp_xact_update_rx(ogs_pfcp_xact_t *xact, uint8_t type)
|
||||||
{
|
{
|
||||||
int rv = OGS_OK;
|
|
||||||
char buf[OGS_ADDRSTRLEN];
|
char buf[OGS_ADDRSTRLEN];
|
||||||
ogs_pfcp_xact_stage_t stage;
|
ogs_pfcp_xact_stage_t stage;
|
||||||
|
|
||||||
|
@ -330,8 +329,7 @@ static int ogs_pfcp_xact_update_rx(ogs_pfcp_xact_t *xact, uint8_t type)
|
||||||
OGS_ADDR(&xact->node->addr,
|
OGS_ADDR(&xact->node->addr,
|
||||||
buf),
|
buf),
|
||||||
OGS_PORT(&xact->node->addr));
|
OGS_PORT(&xact->node->addr));
|
||||||
rv = ogs_pfcp_sendto(xact->node, pkbuf);
|
ogs_expect(OGS_OK == ogs_pfcp_sendto(xact->node, pkbuf));
|
||||||
ogs_expect(rv == OGS_OK);
|
|
||||||
} else {
|
} else {
|
||||||
ogs_warn("[%d] %s Request Duplicated. Discard!"
|
ogs_warn("[%d] %s Request Duplicated. Discard!"
|
||||||
" for step %d type %d peer [%s]:%d",
|
" for step %d type %d peer [%s]:%d",
|
||||||
|
@ -396,8 +394,7 @@ static int ogs_pfcp_xact_update_rx(ogs_pfcp_xact_t *xact, uint8_t type)
|
||||||
OGS_ADDR(&xact->node->addr,
|
OGS_ADDR(&xact->node->addr,
|
||||||
buf),
|
buf),
|
||||||
OGS_PORT(&xact->node->addr));
|
OGS_PORT(&xact->node->addr));
|
||||||
rv = ogs_pfcp_sendto(xact->node, pkbuf);
|
ogs_expect(OGS_OK == ogs_pfcp_sendto(xact->node, pkbuf));
|
||||||
ogs_expect(rv == OGS_OK);
|
|
||||||
} else {
|
} else {
|
||||||
ogs_warn("[%d] %s Request Duplicated. Discard!"
|
ogs_warn("[%d] %s Request Duplicated. Discard!"
|
||||||
" for step %d type %d peer [%s]:%d",
|
" for step %d type %d peer [%s]:%d",
|
||||||
|
@ -561,9 +558,7 @@ int ogs_pfcp_xact_commit(ogs_pfcp_xact_t *xact)
|
||||||
pkbuf = xact->seq[xact->step-1].pkbuf;
|
pkbuf = xact->seq[xact->step-1].pkbuf;
|
||||||
ogs_assert(pkbuf);
|
ogs_assert(pkbuf);
|
||||||
|
|
||||||
if (ogs_pfcp_sendto(xact->node, pkbuf) != OGS_OK) {
|
ogs_expect(OGS_OK == ogs_pfcp_sendto(xact->node, pkbuf));
|
||||||
ogs_error("ogs_pfcp_sendto() failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
return OGS_OK;
|
return OGS_OK;
|
||||||
}
|
}
|
||||||
|
@ -603,9 +598,7 @@ static void response_timeout(void *data)
|
||||||
pkbuf = xact->seq[xact->step-1].pkbuf;
|
pkbuf = xact->seq[xact->step-1].pkbuf;
|
||||||
ogs_assert(pkbuf);
|
ogs_assert(pkbuf);
|
||||||
|
|
||||||
if (ogs_pfcp_sendto(xact->node, pkbuf) != OGS_OK) {
|
ogs_expect(OGS_OK == ogs_pfcp_sendto(xact->node, pkbuf));
|
||||||
ogs_error("ogs_pfcp_sendto() failed");
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
ogs_warn("[%d] %s No Reponse. Give up! "
|
ogs_warn("[%d] %s No Reponse. Give up! "
|
||||||
"for step %d type %d peer [%s]:%d",
|
"for step %d type %d peer [%s]:%d",
|
||||||
|
@ -620,8 +613,6 @@ static void response_timeout(void *data)
|
||||||
|
|
||||||
ogs_pfcp_xact_delete(xact);
|
ogs_pfcp_xact_delete(xact);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void holding_timeout(void *data)
|
static void holding_timeout(void *data)
|
||||||
|
|
Loading…
Reference in New Issue