view src/plugins/fts/fts-plugin.c @ 9658:8ba4253adc9b HEAD tip

*-login: SSL connections didn't get closed when the client got destroyed.
author Timo Sirainen <tss@iki.fi>
date Thu, 08 May 2014 16:41:29 +0300
parents 00cd9aacd03c
children
line wrap: on
line source

/* Copyright (c) 2006-2010 Dovecot authors, see the included COPYING file */

#include "lib.h"
#include "mail-storage-private.h"
#include "fts-plugin.h"

#include <stdlib.h>

const char *fts_plugin_version = PACKAGE_VERSION;

void (*fts_next_hook_mailbox_opened)(struct mailbox *box);

void fts_plugin_init(void)
{
	if (getenv("FTS") != NULL) {
		fts_next_hook_mailbox_opened = hook_mailbox_opened;
		hook_mailbox_opened = fts_mailbox_opened;
	} else if (getenv("DEBUG") != NULL)
		i_info("fts: No fts setting - plugin disabled");
}

void fts_plugin_deinit(void)
{
	if (hook_mailbox_opened == fts_mailbox_opened)
		hook_mailbox_opened = fts_next_hook_mailbox_opened;
}