{
if (!strncasecmp(ChrPtr(Buf), "msgn=", 5)) {
StrBufCutLeft(Buf, 5);
- bltr.id = abs(HashLittle(ChrPtr(Buf), StrLength(Buf)));
+ bltr.id = ThreadIdHash(Buf);
}
else if (!strncasecmp(ChrPtr(Buf), "wefw=", 5)) {
StrBufCutLeft(Buf, 5); /* trim the field name */
StrBufExtract_token(r, Buf, 0, '|');
- bltr.refs = abs(HashLittle(ChrPtr(r), StrLength(r)));
+ bltr.refs = ThreadIdHash(r);
}
}
}
extern int time_to_die; /* Nonzero if server is shutting down */
+/* 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)))
+
/*
* Array type for a blog post. The first message is the post; the rest are comments
*/