Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 9, 2008, 2:39:15 PM (16 years ago)
Author:
rgrieder
Message:

Added a mutex to the static packetMap_ in Packet. This could resolve two issues with that map.
Also added the packetMap_.erase(.) call. So Fabian, if it doesn't work anymore, just comment line 220 in Packet.cc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/network/packet/Packet.h

    r2132 r2164  
    2929#define NETWORKPACKET_H
    3030
    31 #include "../NetworkPrereqs.h"
     31#include "network/NetworkPrereqs.h"
    3232
    3333#include <map>
    3434#include <enet/enet.h>
     35#include <boost/thread/recursive_mutex.hpp>
    3536
    3637#include "util/Integers.h"
     
    9394  private:
    9495    static std::map<size_t, Packet *> packetMap_;
     96    //! Static mutex for any packetMap_ access
     97    static boost::recursive_mutex packetMap_mutex;
    9598    ENetPacket *enetPacket_;
    9699};
Note: See TracChangeset for help on using the changeset viewer.