cosmetic: clarify session active / partially active semantics
Change-Id: I2db85b3ffd61cbf8fb404b17ee3b6593d1d189c4
This commit is contained in:
parent
40a30fce4a
commit
5bd84491b8
|
@ -1529,11 +1529,16 @@ static enum osmo_pfcp_cause up_session_setup_gtp(struct up_session *session)
|
|||
return cause;
|
||||
}
|
||||
|
||||
/* Return true when the session is in Established state and has active GTP actions. */
|
||||
bool up_session_is_active(struct up_session *session)
|
||||
{
|
||||
return session && (session->fi->state == UP_SESSION_ST_ESTABLISHED) && !llist_empty(&session->active_gtp_actions);
|
||||
}
|
||||
|
||||
/* Return true when up_session_is_active() == true *and* it has only active PDR/FAR pairs.
|
||||
* A PDR/FAR is inactive when it is not part of an active GTP action. Reasons may be that it has no PDR-to-FAR relation,
|
||||
* there is no matching reverse PDR/FAR, that a FAR is not set to FORW, an ignored Source/Destination Interface, ...
|
||||
*/
|
||||
bool up_session_is_fully_active(struct up_session *session, int *active_p, int *inactive_p)
|
||||
{
|
||||
struct pdr *pdr;
|
||||
|
|
|
@ -481,7 +481,7 @@ DEFUN(show_session, show_session_cmd,
|
|||
}
|
||||
}
|
||||
}
|
||||
vty_out(vty, "(%d fully-active + %d partially active + %d inactive)%s",
|
||||
vty_out(vty, "(%d fully-active + %d active with some PDR/FAR ignored + %d inactive)%s",
|
||||
fully_active_count, active_count, inactive_count, VTY_NEWLINE);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue