Add macro to calculate a hash from a part of the message id
authorWilfried Goesgens <willi@arangodb.com>
Sun, 3 Jan 2016 16:05:16 +0000 (17:05 +0100)
committerWilfried Goesgens <willi@arangodb.com>
Sun, 3 Jan 2016 16:05:16 +0000 (17:05 +0100)
libcitadel/lib/libcitadel.h

index 3a4d7a18bb9527268df3219bd3656e5ce1a33410..366b8a62c8ce977ce0598403a32061f197867c6f 100644 (file)
@@ -677,6 +677,7 @@ extern ConstStr RoomNetCfgStrs[maxRoomNetCfg];
 
 /* a nice consistent place to define how we turn a message id into a thread id hash */
 #define ThreadIdHash(Buf) abs(HashLittle(ChrPtr(Buf), StrLength(Buf)))
+#define ThreadIdHashOffset(Buf, Offset) abs(HashLittle(ChrPtr(Buf) + Offset, StrLength(Buf)-Offset))
 
 #ifdef __cplusplus
 extern "C" {