Beispiel #1
0
void  CMsnProto::p2p_redirectSessions(const char *wlid)
{
	EnterCriticalSection(&sessionLock);

	ThreadData* T = MSN_GetP2PThreadByContact(wlid);
	for (int i=0; i < sessionList.getCount(); i++) 
	{
		filetransfer* FT = &sessionList[i];
		if (_stricmp(FT->p2p_dest, wlid) == 0 && 
			FT->std.currentFileProgress < FT->std.currentFileSize &&
			(T == NULL || (FT->tType != T->mType && FT->tType != 0)))
		{
			if (FT->p2p_isV2)
			{
				if ((FT->std.flags & PFTS_SENDING) && T)
					FT->tType = T->mType;
			}
			else
			{
				if (!(FT->std.flags & PFTS_SENDING))  
					p2p_sendRedirect(FT);
			}
		}
	}

	LeaveCriticalSection(&sessionLock);
}
Beispiel #2
0
void CMsnProto::p2p_redirectSessions(const char *wlid)
{
	mir_cslock lck(m_csSessions);

	ThreadData* T = MSN_GetP2PThreadByContact(wlid);
	for (int i = 0; i < m_arSessions.getCount(); i++) {
		filetransfer* FT = &m_arSessions[i];
		if (_stricmp(FT->p2p_dest, wlid) == 0 &&
			FT->std.currentFileProgress < FT->std.currentFileSize &&
			(T == NULL || (FT->tType != T->mType && FT->tType != 0))) {
			if (FT->p2p_isV2) {
				if ((FT->std.flags & PFTS_SENDING) && T)
					FT->tType = T->mType;
			}
			else {
				if (!(FT->std.flags & PFTS_SENDING))
					p2p_sendRedirect(FT);
			}
		}
	}
}