Skip to content

Commit

Permalink
xact: Fix debug message printed when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
pespin committed Dec 20, 2023
1 parent f33b36a commit eab121a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
17 changes: 8 additions & 9 deletions lib/gtp/xact.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,11 +865,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",
Expand Down Expand Up @@ -953,12 +953,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",
Expand Down
8 changes: 4 additions & 4 deletions lib/pfcp/xact.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit eab121a

Please sign in to comment.