pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/41576?usp=email )

Change subject: mmctx: LOGIUP: allow ue to be NULL
......................................................................

mmctx: LOGIUP: allow ue to be NULL

In certain cases, the ue can be NULL.
E.g. when receiving a new Iu event without a context.

Change-Id: Ie569fa100abe518cb63c1b918ad7748a7ea3bb99
(cherry picked from commit 234da0eed4b6e5d372c34dc496677463650f3c97)
---
M include/osmocom/sgsn/mmctx.h
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  osmith: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/include/osmocom/sgsn/mmctx.h b/include/osmocom/sgsn/mmctx.h
index 03bb845..8502bdf 100644
--- a/include/osmocom/sgsn/mmctx.h
+++ b/include/osmocom/sgsn/mmctx.h
@@ -231,7 +231,8 @@

 #ifdef BUILD_IU
 #define LOGIUP(ue, level, fmt, args...) \
-       LOGP(DMM, level, "UE(0x%x){%s} " fmt, ue->conn_id, 
osmo_rai_name(&(ue)->ra_id), ## args)
+       LOGP(DMM, level, "UE(0x%x){%s} " fmt, (ue) ? (ue)->conn_id : 
0xffffffff, \
+            (ue) ? osmo_rai_name(&(ue)->ra_id) : "", ## args)
 #else
 #define LOGIUP(ue, level, fmt, args...) \
        LOGP(DMM, level, "UE(%p){NOTSUPPORTED} " fmt, ue, ## args)

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/41576?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-sgsn
Gerrit-Branch: pespin/rel-1.13.0
Gerrit-Change-Id: Ie569fa100abe518cb63c1b918ad7748a7ea3bb99
Gerrit-Change-Number: 41576
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-CC: lynxis lazus <[email protected]>

Reply via email to