diff --git a/lib/gtp/xact.c b/lib/gtp/xact.c index 047d38f80..0030de27b 100644 --- a/lib/gtp/xact.c +++ b/lib/gtp/xact.c @@ -859,11 +859,11 @@ int ogs_gtp1_xact_receive( } } - ogs_debug("[%d] Cannot find xact type %u from GTPv1 peer [%s]:%d", - xid, type, OGS_ADDR(&gnode->addr, buf), OGS_PORT(&gnode->addr)); - - if (!new) + if (!new) { + ogs_debug("[%d] Cannot find xact type %u from GTPv1 peer [%s]:%d", + xid, type, OGS_ADDR(&gnode->addr, buf), OGS_PORT(&gnode->addr)); new = ogs_gtp_xact_remote_create(gnode, 1, sqn); + } ogs_assert(new); ogs_debug("[%d] %s Receive peer [%s]:%d", @@ -947,12 +947,11 @@ int ogs_gtp_xact_receive( } } - ogs_debug("[%d] Cannot find xact type %u from GTPv2 peer [%s]:%d", - xid, type, - OGS_ADDR(&gnode->addr, buf), OGS_PORT(&gnode->addr)); - - if (!new) + if (!new) { + ogs_debug("[%d] Cannot find xact type %u from GTPv2 peer [%s]:%d", + xid, type, OGS_ADDR(&gnode->addr, buf), OGS_PORT(&gnode->addr)); new = ogs_gtp_xact_remote_create(gnode, 2, sqn); + } ogs_assert(new); ogs_debug("[%d] %s Receive peer [%s]:%d", diff --git a/lib/pfcp/xact.c b/lib/pfcp/xact.c index 8e8334bd5..878bec714 100644 --- a/lib/pfcp/xact.c +++ b/lib/pfcp/xact.c @@ -717,11 +717,11 @@ int ogs_pfcp_xact_receive( } } - ogs_debug("[%d] Cannot find new type %u from PFCP peer [%s]:%d", - xid, type, OGS_ADDR(&node->addr, buf), OGS_PORT(&node->addr)); - - if (!new) + if (!new) { + ogs_debug("[%d] Cannot find new type %u from PFCP peer [%s]:%d", + xid, type, OGS_ADDR(&node->addr, buf), OGS_PORT(&node->addr)); new = ogs_pfcp_xact_remote_create(node, sqn); + } ogs_assert(new); ogs_debug("[%d] %s Receive peer [%s]:%d",