Skip to content

Commit

Permalink
relax asserts() to prevent crashes in 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
spencersevilla committed Jan 8, 2024
1 parent fdf0d76 commit 2b2aa0b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/core/ogs-sockaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ const char *ogs_inet_ntop(void *sa, char *buf, int buflen)
INET6_ADDRSTRLEN);
default:
ogs_fatal("Unknown family(%d)", family);
ogs_abort();
// ogs_abort();
return NULL;
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/sgwc/s5c-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,12 @@ void sgwc_s5c_handle_delete_session_response(
/********************
* Check Transaction
********************/
// if we don't have a transaction to delete, move on
if (!s5c_xact || !s11_xact) {
ogs_error("Cannot find transaction to delete!");
return;
}

ogs_assert(s5c_xact);
s11_xact = s5c_xact->assoc_xact;
ogs_assert(s11_xact);
Expand Down
8 changes: 6 additions & 2 deletions src/sgwc/sxa-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,12 @@ static void sgwc_sxa_handle_session_reestablishment(

ogs_pfcp_f_seid_t *up_f_seid = NULL;
up_f_seid = pfcp_rsp->up_f_seid.data;
ogs_assert(up_f_seid);
sess->sgwu_sxa_seid = be64toh(up_f_seid->seid);
//ogs_assert(up_f_seid);
if (!up_f_seid) {
ogs_error("We do not have a stored F-SEID?!?");
} else {
sess->sgwu_sxa_seid = be64toh(up_f_seid->seid);
}

stats_update_sgwc_sessions();

Expand Down

0 comments on commit 2b2aa0b

Please sign in to comment.