aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gb_proxy.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-08 16:30:24 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-09 21:40:44 +0800
commit62eaf54e7a4325bf2ddc3b568f10d51ba34472f0 (patch)
treec95395d45bb254b3e6671127c364f5c75b70b357 /openbsc/src/gprs/gb_proxy.c
parent57da4471d1511e5456d67088e2c34b1799f08b9a (diff)
GPRS: Fix crash when the peer can not be found...
Use UINT_MAX (or -1) if the peer can not be found.
Diffstat (limited to 'openbsc/src/gprs/gb_proxy.c')
-rw-r--r--openbsc/src/gprs/gb_proxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index b6fbac77e..936b10227 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -320,11 +320,11 @@ static int gbprox_rx_paging(struct msgb *msg, struct tlv_parsed *tp,
} else if (TLVP_PRESENT(tp, BSSGP_IE_ROUTEING_AREA)) {
peer = peer_by_rac(TLVP_VAL(tp, BSSGP_IE_ROUTEING_AREA));
LOGPC(DGPRS, LOGL_INFO, "routing by RAC to peer BVCI=%u\n",
- peer->bvci);
+ peer ? peer->bvci : -1);
} else if (TLVP_PRESENT(tp, BSSGP_IE_LOCATION_AREA)) {
peer = peer_by_lac(TLVP_VAL(tp, BSSGP_IE_LOCATION_AREA));
LOGPC(DGPRS, LOGL_INFO, "routing by LAC to peer BVCI=%u\n",
- peer->bvci);
+ peer ? peer->bvci : -1);
} else
LOGPC(DGPRS, LOGL_INFO, "\n");