]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/fulltext/serv_fulltext.c
Changed the way we do the TSD area.
[citadel.git] / citadel / modules / fulltext / serv_fulltext.c
index 4a8bdc6440e03b8695ddacd4005cc22b69964901..7c76d9d640f7fba95570c91be1b0bbf5eea9ec7d 100644 (file)
@@ -339,6 +339,8 @@ void do_fulltext_indexing(void) {
 void *indexer_thread(void *arg) {
        struct CitContext indexerCC;
 
+       CtdlThreadAllocTSD();
+       
        lprintf(CTDL_DEBUG, "indexer_thread() initializing\n");
 
        memset(&indexerCC, 0, sizeof(struct CitContext));
@@ -346,8 +348,6 @@ void *indexer_thread(void *arg) {
        indexerCC.cs_pid = 0;
        pthread_setspecific(MyConKey, (void *)&indexerCC );
 
-       cdb_allocate_tsd();
-
        while (!CtdlThreadCheckStop()) {
                do_fulltext_indexing();
                CtdlThreadSleep(300);
@@ -499,7 +499,7 @@ CTDL_MODULE_INIT(fulltext)
        }
        else
        {
-               CtdlThreadCreate("indexer", CTDLTHREAD_BIGSTACK, indexer_thread, NULL);
+               CtdlThreadCreate("Indexer", CTDLTHREAD_BIGSTACK, indexer_thread, NULL);
        }
        /* return our Subversion id for the Log */
        return "$Id$";