The sender thread has been rewritten with a new algorithm in mind. The sender should not stall any more, and no timeout is required. There are no more send priorities.
The avatar manager no longer serializes access to avatar files.
This commit is contained in:
@@ -47,10 +47,10 @@ public:
|
||||
|
||||
void AddSingleAvatar(const std::string &fileName);
|
||||
|
||||
boost::shared_ptr<AvatarFileState> OpenAvatarFileForChunkRead(const std::string &fileName, unsigned &outFileSize, AvatarFileType &outFileType);
|
||||
unsigned ChunkReadAvatarFile(boost::shared_ptr<AvatarFileState> fileState, unsigned char *data, unsigned chunkSize);
|
||||
static boost::shared_ptr<AvatarFileState> OpenAvatarFileForChunkRead(const std::string &fileName, unsigned &outFileSize, AvatarFileType &outFileType);
|
||||
static unsigned ChunkReadAvatarFile(boost::shared_ptr<AvatarFileState> fileState, unsigned char *data, unsigned chunkSize);
|
||||
|
||||
int AvatarFileToNetPackets(const std::string &fileName, unsigned requestId, NetPacketList &packets);
|
||||
static int AvatarFileToNetPackets(const std::string &fileName, unsigned requestId, NetPacketList &packets);
|
||||
|
||||
bool GetHashForAvatar(const std::string &fileName, MD5Buf &md5buf) const;
|
||||
bool GetAvatarFileName(const MD5Buf &md5buf, std::string &fileName) const;
|
||||
@@ -77,8 +77,6 @@ private:
|
||||
|
||||
mutable boost::mutex m_cacheDirMutex;
|
||||
std::string m_cacheDir;
|
||||
|
||||
mutable boost::mutex m_loadMutex;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -192,9 +192,6 @@ AvatarManager::ChunkReadAvatarFile(boost::shared_ptr<AvatarFileState> fileState,
|
||||
int
|
||||
AvatarManager::AvatarFileToNetPackets(const string &fileName, unsigned requestId, NetPacketList &packets)
|
||||
{
|
||||
// Serialize avatar access for now.
|
||||
boost::mutex::scoped_lock lock(m_loadMutex);
|
||||
|
||||
int retVal = ERR_NET_INVALID_AVATAR_FILE;
|
||||
unsigned fileSize;
|
||||
AvatarFileType fileType;
|
||||
|
||||
Reference in New Issue
Block a user