diff --git a/src/AsyncHandleAllocator.cpp b/src/AsyncHandleAllocator.cpp index 5c7eeb2..bb11a67 100644 --- a/src/AsyncHandleAllocator.cpp +++ b/src/AsyncHandleAllocator.cpp @@ -23,7 +23,7 @@ DPNHANDLE AsyncHandleAllocator::new_enum() DPNHANDLE AsyncHandleAllocator::new_connect() { - DPNHANDLE handle = next_connect_id++ | TYPE_ENUM; + DPNHANDLE handle = next_connect_id++ | TYPE_CONNECT; next_connect_id &= ~TYPE_MASK; if(next_connect_id == 0) @@ -36,7 +36,7 @@ DPNHANDLE AsyncHandleAllocator::new_connect() DPNHANDLE AsyncHandleAllocator::new_send() { - DPNHANDLE handle = next_send_id++ | TYPE_ENUM; + DPNHANDLE handle = next_send_id++ | TYPE_SEND; next_send_id &= ~TYPE_MASK; if(next_send_id == 0) @@ -49,7 +49,7 @@ DPNHANDLE AsyncHandleAllocator::new_send() DPNHANDLE AsyncHandleAllocator::new_pinfo() { - DPNHANDLE handle = next_pinfo_id++ | TYPE_ENUM; + DPNHANDLE handle = next_pinfo_id++ | TYPE_PINFO; next_pinfo_id &= ~TYPE_MASK; if(next_pinfo_id == 0) diff --git a/src/AsyncHandleAllocator.hpp b/src/AsyncHandleAllocator.hpp index faf289c..e0e60fb 100644 --- a/src/AsyncHandleAllocator.hpp +++ b/src/AsyncHandleAllocator.hpp @@ -27,10 +27,10 @@ class AsyncHandleAllocator public: static const DPNHANDLE TYPE_MASK = 0x1C000000; - static const DPNHANDLE TYPE_ENUM = 0x000000000; /* EnumHosts() */ - static const DPNHANDLE TYPE_CONNECT = 0x040000000; /* Connect() */ - static const DPNHANDLE TYPE_SEND = 0x080000000; /* SendTo() */ - static const DPNHANDLE TYPE_PINFO = 0x0C0000000; /* SetPeerInfo() */ + static const DPNHANDLE TYPE_ENUM = 0x00000000; /* EnumHosts() */ + static const DPNHANDLE TYPE_CONNECT = 0x04000000; /* Connect() */ + static const DPNHANDLE TYPE_SEND = 0x08000000; /* SendTo() */ + static const DPNHANDLE TYPE_PINFO = 0x0C000000; /* SetPeerInfo() */ AsyncHandleAllocator();