From cfe8ef78528c34a02fa1665095697bcd9ddfb200 Mon Sep 17 00:00:00 2001 From: Tai Vuong Date: Thu, 16 Nov 2017 15:52:15 -0500 Subject: fix Invalid streamID error when close stream Signed-off-by: Tai Vuong --- ahl-policy/ahl-policy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ahl-policy') diff --git a/ahl-policy/ahl-policy.c b/ahl-policy/ahl-policy.c index 21ec669..62e1e3c 100644 --- a/ahl-policy/ahl-policy.c +++ b/ahl-policy/ahl-policy.c @@ -815,7 +815,11 @@ int Policy_CloseStream(json_object *pStreamJ) if(pCurrEndPointPolicy) { //close the stream and handle unduck if need be - PolicyRunningIdleTransition(pCurrEndPointPolicy, &Stream); + if((pCurrEndPointPolicy->streamInfo != NULL) && (pCurrEndPointPolicy->streamInfo->len > 0)) + { + PolicyRunningIdleTransition(pCurrEndPointPolicy, &Stream); + } + } return AHL_POLICY_ACCEPT; } -- cgit 1.2.3-korg