]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fts: Don't notify storage about finishing indexing if notify_ok callback is NULL.
authorTimo Sirainen <tss@iki.fi>
Thu, 17 Mar 2011 17:02:26 +0000 (19:02 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 17 Mar 2011 17:02:26 +0000 (19:02 +0200)
src/plugins/fts/fts-storage.c

index f9c8cff0aee9920a638f1ae147bcb0dd8ac65cda..943464df1033e05eb5d93791d48d2f1e4129d14b 100644 (file)
@@ -546,7 +546,8 @@ static int fts_build_deinit(struct fts_storage_build_context **_ctx)
        }
 
        if (ioloop_time - ctx->search_start_time.tv_sec >=
-           FTS_BUILD_NOTIFY_INTERVAL_SECS) {
+           FTS_BUILD_NOTIFY_INTERVAL_SECS &&
+           box->storage->callbacks.notify_ok != NULL) {
                /* we notified at least once */
                box->storage->callbacks.
                        notify_ok(box, "Mailbox indexing finished",