Follow-up the contribution #1566, #1567

This commit is contained in:
Sukchan Lee 2022-05-31 21:44:53 +09:00
parent e1e8018919
commit 8b3fa5ff9f
3 changed files with 28 additions and 13 deletions

View File

@ -42,6 +42,8 @@ If you have tested radio hardware from a vendor not listed with Open5GS, please
* Nokia FW2PC BC28 Flexi Zone G2 Outdoor Micro FDD LTE 700 MHz High Power * Nokia FW2PC BC28 Flexi Zone G2 Outdoor Micro FDD LTE 700 MHz High Power
* Nokia FWH1 B38 Flexi Zone Outdoor Micro TD LTE 2600 MHz * Nokia FWH1 B38 Flexi Zone Outdoor Micro TD LTE 2600 MHz
* Nokia FRGY Flexi BTS BBU with Nokia FRCG RRU Band 5 850Mhz FDD 40W. Version 16.1A to 19.0 * Nokia FRGY Flexi BTS BBU with Nokia FRCG RRU Band 5 850Mhz FDD 40W. Version 16.1A to 19.0
* Nokia FW2FA Flexi Zone Mini-Macro Outdoor BTS, 2x20w Band 39
* Nokia FWGR Flexi Zone Mini-Macro Outdoor BTS, 2x20w Band 1
* Ruckus Q710 and Q910 * Ruckus Q710 and Q910
### 4G/5G Software Stacks + SDRs ### 4G/5G Software Stacks + SDRs

View File

@ -620,7 +620,6 @@ static int ogs_gtp_xact_update_rx(ogs_gtp_xact_t *xact, uint8_t type)
int ogs_gtp_xact_commit(ogs_gtp_xact_t *xact) int ogs_gtp_xact_commit(ogs_gtp_xact_t *xact)
{ {
int rv;
char buf[OGS_ADDRSTRLEN]; char buf[OGS_ADDRSTRLEN];
uint8_t type; uint8_t type;
@ -726,10 +725,13 @@ 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);
rv = ogs_gtp_sendto(xact->gnode, pkbuf); if (ogs_gtp_sendto(xact->gnode, pkbuf) != OGS_OK) {
ogs_expect(rv == OGS_OK); ogs_error("ogs_gtp_sendto() failed");
ogs_gtp_xact_delete(xact);
return OGS_ERROR;
}
return rv; return OGS_OK;
} }
static void response_timeout(void *data) static void response_timeout(void *data)
@ -1068,7 +1070,8 @@ static ogs_gtp_xact_t *ogs_gtp_xact_find_by_xid(
} }
break; break;
default: default:
ogs_warn("%s: Unexpected stage %u.", OGS_FUNC, stage); ogs_warn("Unexpected stage %u.", stage);
ogs_assert_if_reached();
return NULL; return NULL;
} }
@ -1085,7 +1088,7 @@ static ogs_gtp_xact_t *ogs_gtp_xact_find_by_xid(
} }
} }
ogs_error("[%d] Failed Finding xact type %u from GTPv%u peer [%s]:%d", ogs_debug("[%d] Cannot find xact type %u from GTPv%u peer [%s]:%d",
xid, type, gtp_version, xid, type, gtp_version,
OGS_ADDR(&gnode->addr, buf), OGS_PORT(&gnode->addr)); OGS_ADDR(&gnode->addr, buf), OGS_PORT(&gnode->addr));
return NULL; return NULL;

View File

@ -459,7 +459,6 @@ static int ogs_pfcp_xact_update_rx(ogs_pfcp_xact_t *xact, uint8_t type)
int ogs_pfcp_xact_commit(ogs_pfcp_xact_t *xact) int ogs_pfcp_xact_commit(ogs_pfcp_xact_t *xact)
{ {
int rv;
char buf[OGS_ADDRSTRLEN]; char buf[OGS_ADDRSTRLEN];
uint8_t type; uint8_t type;
@ -562,8 +561,11 @@ 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);
rv = ogs_pfcp_sendto(xact->node, pkbuf); if (ogs_pfcp_sendto(xact->node, pkbuf) != OGS_OK) {
ogs_expect(rv == OGS_OK); ogs_error("ogs_pfcp_sendto() failed");
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
}
return OGS_OK; return OGS_OK;
} }
@ -756,10 +758,13 @@ static ogs_pfcp_xact_t *ogs_pfcp_xact_find_by_xid(
ogs_list_t *list = NULL; ogs_list_t *list = NULL;
ogs_pfcp_xact_t *xact = NULL; ogs_pfcp_xact_t *xact = NULL;
ogs_pfcp_xact_stage_t stage;
ogs_assert(node); ogs_assert(node);
switch (ogs_pfcp_xact_get_stage(type, xid)) { stage = ogs_pfcp_xact_get_stage(type, xid);
switch (stage) {
case PFCP_XACT_INITIAL_STAGE: case PFCP_XACT_INITIAL_STAGE:
list = &node->remote_list; list = &node->remote_list;
break; break;
@ -770,8 +775,9 @@ static ogs_pfcp_xact_t *ogs_pfcp_xact_find_by_xid(
list = &node->local_list; list = &node->local_list;
break; break;
default: default:
ogs_warn("Unexpected stage %u.", stage);
ogs_assert_if_reached(); ogs_assert_if_reached();
break; return NULL;
} }
ogs_assert(list); ogs_assert(list);
@ -782,11 +788,15 @@ static ogs_pfcp_xact_t *ogs_pfcp_xact_find_by_xid(
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
OGS_ADDR(&node->addr, buf), OGS_ADDR(&node->addr, buf),
OGS_PORT(&node->addr)); OGS_PORT(&node->addr));
break; return xact;
} }
} }
return xact; ogs_debug("[%d] Cannot find xact type %u from PFCP peer [%s]:%d",
xid, type,
OGS_ADDR(&node->addr, buf), OGS_PORT(&node->addr));
return NULL;
} }
static int ogs_pfcp_xact_delete(ogs_pfcp_xact_t *xact) static int ogs_pfcp_xact_delete(ogs_pfcp_xact_t *xact)