bsc_nat_fsm: check for error from get_next_id_ran

Related: SYS#5560
Change-Id: Ic55ba119e9c736c396f06a58ec9bc1f4682e9b11
This commit is contained in:
Oliver Smith 2022-04-11 11:44:01 +02:00
parent 1d20ac48fc
commit 9b5e22b2d2
1 changed files with 6 additions and 1 deletions

View File

@ -200,7 +200,12 @@ static int sccp_sap_up_ran(struct osmo_prim_hdr *oph, void *scu)
goto error;
}
subscr_conn = subscr_conn_alloc(msc, bsc, subscr_conn_get_next_id_ran(), prim->u.connect.conn_id);
rc = subscr_conn_get_next_id_ran();
if (rc < 0) {
LOGP(DMAIN, LOGL_ERROR, "Failed to get next_id_ran\n");
goto error;
}
subscr_conn = subscr_conn_alloc(msc, bsc, rc, prim->u.connect.conn_id);
LOGP(DMAIN, LOGL_DEBUG, "Fwd via %s\n", talloc_get_name(subscr_conn));