- /* FIXME do something with this */
- lprintf(CTDL_DEBUG, "msg %ld, token %d\n",
- msgnum, tokens[i]);
+
+ /* Add the message to the relevant token bucket */
+ lprintf(CTDL_DEBUG, "msg %ld, token %d\n", msgnum, tokens[i]);
+
+ /* FIXME lock the file */
+ cdb_bucket = cdb_fetch(CDB_FULLTEXT, &tokens[i], sizeof(long));
+ if (cdb_bucket == NULL) {
+ cdb_bucket = malloc(sizeof(struct cdbdata));
+ cdb_bucket->len = 0;
+ cdb_bucket->ptr = malloc(sizeof(long));