[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] engine/core bcastmgr.cpp,1.92.2.2,1.92.2.3
From: jzeng () helixcommunity ! org
Date: 2010-05-12 18:44:51
Message-ID: 201005121844.o4CIicfq020240 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/server/engine/core
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv32553
Modified Files:
Tag: SERVER_14_0
bcastmgr.cpp
Log Message:
Synopsis
============
Bug 261582: W2K8 had bad response to an encoder instance behaving
oddly
Branches: head, SERVER_14_RN
Suggested Reviewer: Jamie
Description
===========
The fix is a guess without repro. From the stacks, it looks like m_pGateway is gone when
RemoveBroadcastStreamer is called. From the code we can see that
HXAtomicDecUINT32(&m_pGateway->m_ulPlayerCount); is called before RemoveBroadcastStreamer.
m_ulPlayerCount is like refcount for BroadcastGatway. When it gets decreased to 0, the
DestructCallback in the broadcast plugin process may release the gateway, and causes everything to
be released.
This fix is to switch the sequence, RemoveBroadcastStreamer will be called first, then the decrease
of m_ulPlayerCount. This way we guarantee the gateway exists when RemoveBroadcastStreamer is
called.
cvFiles Affected
==============
server/engine/core/bcastmgr.cpp
Testing Performed
=================
Unit Tests:
None.
Integration Tests:
None.
Leak Tests:
None.
Performance Tests:
- None
Platforms Tested: win32-i386-vc7
Build verified: win32-i386-vc7
Index: bcastmgr.cpp
===================================================================
RCS file: /cvsroot/server/engine/core/bcastmgr.cpp,v
retrieving revision 1.92.2.2
retrieving revision 1.92.2.3
diff -u -d -r1.92.2.2 -r1.92.2.3
--- bcastmgr.cpp 6 Mar 2010 20:03:17 -0000 1.92.2.2
+++ bcastmgr.cpp 12 May 2010 18:44:48 -0000 1.92.2.3
@@ -435,8 +435,8 @@
HX_RELEASE(m_pStreamDoneCallback);
HX_VECTOR_DELETE(m_pbPacketsStarted);
- HXAtomicDecUINT32(&m_pGateway->m_ulPlayerCount);
m_pGateway->RemoveBroadcastStreamer(m_pProc, this);
+ HXAtomicDecUINT32(&m_pGateway->m_ulPlayerCount);
m_bSourceAborted = TRUE;
// update registry's count of active players for the stream assoc. with this gateway
_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic