9
0
Fork 0

LU: correctly determine and use is_ps

Don't use a local uninitialized variable but the luop->is_ps instead.
This commit is contained in:
Harald Welte 2016-05-05 21:04:11 +02:00
parent 82a583b6ba
commit 590eb20620
1 changed files with 2 additions and 3 deletions

View File

@ -342,7 +342,6 @@ static int rx_upd_loc_req(struct osmo_gsup_conn *conn,
const struct osmo_gsup_message *gsup)
{
int rc;
bool is_ps;
struct lu_operation *luop;
struct hlr_subscriber *subscr;
uint8_t *peer_addr;
@ -374,10 +373,10 @@ static int rx_upd_loc_req(struct osmo_gsup_conn *conn,
/* Check if subscriber is generally permitted on CS or PS
* service (as requested) */
if (!is_ps && !subscr->nam_cs) {
if (!luop->is_ps && !subscr->nam_cs) {
lu_op_tx_error(luop, GMM_CAUSE_PLMN_NOTALLOWED);
return 0;
} else if (is_ps && !subscr->nam_ps) {
} else if (luop->is_ps && !subscr->nam_ps) {
lu_op_tx_error(luop, GMM_CAUSE_GPRS_NOTALLOWED);
return 0;
}