Change another mutex back to being recursive. Oops. Fixes #9450

This commit is contained in:
Henrik Rydgard 2017-03-18 22:33:43 +01:00
parent f6463ae43f
commit d30116b8c3
2 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ int metasocket;
SceNetAdhocctlParameter parameter;
SceNetAdhocctlAdhocId product_code;
std::thread friendFinderThread;
std::mutex peerlock;
std::recursive_mutex peerlock;
SceNetAdhocPdpStat * pdp[255];
SceNetAdhocPtpStat * ptp[255];
uint32_t localip;
@ -104,7 +104,7 @@ void addFriend(SceNetAdhocctlConnectPacketS2C * packet) {
if (packet == NULL) return;
// Multithreading Lock
std::lock_guard<std::mutex> guard(peerlock);
std::lock_guard<std::recursive_mutex> guard(peerlock);
SceNetAdhocctlPeerInfo * peer = findFriend(&packet->mac);
// Already existed
@ -1525,7 +1525,7 @@ bool resolveMAC(SceNetEtherAddr * mac, uint32_t * ip) {
}
// Multithreading Lock
std::lock_guard<std::mutex> guard(peerlock);
std::lock_guard<std::recursive_mutex> guard(peerlock);
// Peer Reference
SceNetAdhocctlPeerInfo * peer = friends;

View File

@ -788,7 +788,7 @@ extern int metasocket;
extern SceNetAdhocctlParameter parameter;
extern SceNetAdhocctlAdhocId product_code;
extern std::thread friendFinderThread;
extern std::mutex peerlock;
extern std::recursive_mutex peerlock;
extern SceNetAdhocPdpStat * pdp[255];
extern SceNetAdhocPtpStat * ptp[255];
extern std::map<int, AdhocctlHandler> adhocctlHandlers;