]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_fulltext.c
mk_module_init.sh now tests to see if echo supports -e and -E
[citadel.git] / citadel / serv_fulltext.c
index ab78a7428c2ac08b40b5de6eb8c3ace0aea8baaf..f6e2c672a8902f0a07be23f3a4c18b7a39e27fa9 100644 (file)
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"
 #include "config.h"
-#include "serv_extensions.h"
 #include "database.h"
 #include "msgbase.h"
 #include "control.h"
 #include "ft_wordbreaker.h"
 
 
+#include "ctdl_module.h"
+
+
+
 long ft_newhighest = 0L;
 long *ft_newmsgs = NULL;
 int ft_num_msgs = 0;
@@ -175,8 +177,6 @@ void ft_index_message(long msgnum, int op) {
                        else {
                                lprintf(CTDL_ALERT, "Invalid token %d !!\n", tok);
                        }
-
-                       /* FIXME do we need to unlock the file here? */
                }
 
                free(tokens);
@@ -279,7 +279,7 @@ void do_fulltext_indexing(void) {
 
                /* Here it is ... do each message! */
                for (i=0; i<ft_num_msgs; ++i) {
-                       if ((time(NULL) - last_progress) > 10) {
+                       if (time(NULL) != last_progress) {
                                lprintf(CTDL_DEBUG,
                                        "Indexed %d of %d messages (%d%%)\n",
                                                i, ft_num_msgs,
@@ -469,9 +469,11 @@ void initialize_ft_cache(void) {
 
 /*****************************************************************************/
 
-char *serv_fulltext_init(void)
+CTDL_MODULE_INIT(fulltext)
 {
        initialize_ft_cache();
        CtdlRegisterProtoHook(cmd_srch, "SRCH", "Full text search");
+
+       /* return our Subversion id for the Log */
        return "$Id$";
 }