Added a macro to get a threads structure.
[citadel.git] / citadel / modules / fulltext / serv_fulltext.c
index 4a8bdc6440e03b8695ddacd4005cc22b69964901..4737f66f07a7069a5f7e16b174c35cec0f23107f 100644 (file)
@@ -222,6 +222,8 @@ void do_fulltext_indexing(void) {
        time_t run_time = 0L;
        time_t end_time = 0L;
        
+       CT_PUSH();
+       
        /*
         * Don't do this if the site doesn't have it enabled.
         */
@@ -297,7 +299,7 @@ void do_fulltext_indexing(void) {
                        ft_index_message(ft_newmsgs[i], 1);
 
                        /* Check to see if we need to quit early */
-                       if (CtdlThreadCheckStop()) {
+                       if (CtdlThreadCheckStop(CT)) {
                                lprintf(CTDL_DEBUG, "Indexer quitting early\n");
                                ft_newhighest = ft_newmsgs[i];
                                break;
@@ -339,6 +341,8 @@ void do_fulltext_indexing(void) {
 void *indexer_thread(void *arg) {
        struct CitContext indexerCC;
 
+       CT_PUSH();
+       
        lprintf(CTDL_DEBUG, "indexer_thread() initializing\n");
 
        memset(&indexerCC, 0, sizeof(struct CitContext));
@@ -348,7 +352,7 @@ void *indexer_thread(void *arg) {
 
        cdb_allocate_tsd();
 
-       while (!CtdlThreadCheckStop()) {
+       while (!CtdlThreadCheckStop(CT)) {
                do_fulltext_indexing();
                CtdlThreadSleep(300);
        }