Exemplo n.º 1
0
void mf_info_peer_unregister(mfInfo* mfi, mfPeerContext* context)
{
	if (mf_info_lock(mfi) > 0)
	{
		int peerId;
		
		peerId = ((rdpContext*) context)->peer->pId;
		mfi->peers[peerId] = NULL;
		mfi->peerCount--;
		
		if (mfi->peerCount == 0)
			mf_mlion_stop_getting_screen_updates();

		mf_info_unlock(mfi);
	}
}
Exemplo n.º 2
0
void mf_info_peer_unregister(mfInfo* mfi, mfPeerContext* context)
{
	if (mf_info_lock(mfi) > 0)
	{
		int peerId;

		peerId = ((rdpContext*) context)->peer->pId;
		mfi->peers[peerId] = NULL;
		mfi->peerCount--;

		printf("Unregistering Peer: id=%d, #=%d\n", peerId, mfi->peerCount);

        //screen capture cleanup
		if (mfi->peerCount == 0)
        {
            mf_mlion_stop_getting_screen_updates();
        }
		mf_info_unlock(mfi);

		//mfreerdp_server_peer_callback_event(peerId, MF_SRV_CALLBACK_EVENT_DISCONNECT);
	}
}