Add LiGetPortFlagsFromTerminationErrorCode()

This commit is contained in:
Cameron Gutman
2020-08-06 21:43:18 -07:00
parent 6010367637
commit 453c722fa8
2 changed files with 20 additions and 3 deletions

View File

@@ -27,6 +27,20 @@ unsigned int LiGetPortFlagsFromStage(int stage)
}
}
unsigned int LiGetPortFlagsFromTerminationErrorCode(int errorCode)
{
switch (errorCode)
{
case ML_ERROR_NO_VIDEO_TRAFFIC:
// Video is UDP 47998, but we'll also test UDP 48000 because
// we don't have an equivalent audio traffic error.
return ML_PORT_FLAG_UDP_47998 | ML_PORT_FLAG_UDP_48000;
default:
return 0;
}
}
int LiGetProtocolFromPortFlagIndex(int portFlagIndex)
{
// The lower byte is reserved for TCP