gsup_test_client: gsupc_read_cb: fix uninitialized value 'io'
Change-Id: Idb3ca50009e25c8e10bcbd15e430caf6de18a040
This commit is contained in:
parent
7fdfad2f5d
commit
053e27528c
|
@ -217,7 +217,7 @@ static int op_type_by_gsup_msgt(enum osmo_gsup_message_type msg_type)
|
||||||
static int gsupc_read_cb(struct gsup_client *gsupc, struct msgb *msg)
|
static int gsupc_read_cb(struct gsup_client *gsupc, struct msgb *msg)
|
||||||
{
|
{
|
||||||
struct osmo_gsup_message gsup_msg = {0};
|
struct osmo_gsup_message gsup_msg = {0};
|
||||||
struct imsi_op *io;
|
struct imsi_op *io = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DEBUGP(DLGSUP, "Rx GSUP %s\n", msgb_hexdump(msg));
|
DEBUGP(DLGSUP, "Rx GSUP %s\n", msgb_hexdump(msg));
|
||||||
|
@ -237,14 +237,14 @@ static int gsupc_read_cb(struct gsup_client *gsupc, struct msgb *msg)
|
||||||
case IMSI_OP_SAI:
|
case IMSI_OP_SAI:
|
||||||
case IMSI_OP_LU:
|
case IMSI_OP_LU:
|
||||||
io = imsi_op_find(gsup_msg.imsi, rc);
|
io = imsi_op_find(gsup_msg.imsi, rc);
|
||||||
if (!io)
|
|
||||||
return -1;
|
|
||||||
break;
|
break;
|
||||||
case IMSI_OP_ISD:
|
case IMSI_OP_ISD:
|
||||||
/* ISD is an inbound transaction */
|
/* ISD is an inbound transaction */
|
||||||
io = imsi_op_alloc(g_gc, gsup_msg.imsi, IMSI_OP_ISD);
|
io = imsi_op_alloc(g_gc, gsup_msg.imsi, IMSI_OP_ISD);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!io)
|
||||||
|
return -1;
|
||||||
|
|
||||||
imsi_op_rx_gsup(io, &gsup_msg);
|
imsi_op_rx_gsup(io, &gsup_msg);
|
||||||
msgb_free(msg);
|
msgb_free(msg);
|
||||||
|
|
Loading…
Reference in New Issue