~ubuntu-branches/ubuntu/wily/dovecot-antispam/wily-proposed

« back to all changes in this revision

Viewing changes to dspam-exec.c

  • Committer: Bazaar Package Importer
  • Author(s): Ron Lee
  • Date: 2011-03-06 07:49:56 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110306074956-j8w77n81y7r0tsfd
Tags: 1.4~rc2-1
Drop all the extra builds again.
All of the backends build into a single plugin now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
        struct siglist *siglist;
164
164
};
165
165
 
166
 
struct antispam_transaction_context *
 
166
static struct antispam_transaction_context *
167
167
backend_start(struct mailbox *box __attr_unused__)
168
168
{
169
169
        struct antispam_transaction_context *ast;
173
173
        return ast;
174
174
}
175
175
 
176
 
void backend_rollback(struct antispam_transaction_context *ast)
 
176
static void backend_rollback(struct antispam_transaction_context *ast)
177
177
{
178
178
        signature_list_free(&ast->siglist);
179
179
        i_free(ast);
180
180
}
181
181
 
182
 
int backend_commit(struct mailbox_transaction_context *ctx,
183
 
                   struct antispam_transaction_context *ast)
 
182
static int backend_commit(struct mailbox_transaction_context *ctx,
 
183
                          struct antispam_transaction_context *ast)
184
184
{
185
185
        struct siglist *item = ast->siglist;
186
186
        int ret = 0;
201
201
        return ret;
202
202
}
203
203
 
204
 
int backend_handle_mail(struct mailbox_transaction_context *t,
205
 
                        struct antispam_transaction_context *ast,
206
 
                        struct mail *mail, enum classification want)
 
204
static int backend_handle_mail(struct mailbox_transaction_context *t,
 
205
                               struct antispam_transaction_context *ast,
 
206
                               struct mail *mail, enum classification want)
207
207
{
208
208
        const char *const *result = NULL;
209
209
        int i;
224
224
        return signature_extract_to_list(t, mail, &ast->siglist, want);
225
225
}
226
226
 
227
 
void backend_init(pool_t pool)
 
227
static void backend_init(pool_t pool)
228
228
{
229
229
        const char *tmp;
230
230
        int i;
263
263
        signature_init();
264
264
}
265
265
 
266
 
void backend_exit(void)
 
266
static void backend_exit(void)
267
267
{
268
268
}
 
269
 
 
270
struct backend dspam_backend = {
 
271
        .init = backend_init,
 
272
        .exit = backend_exit,
 
273
        .handle_mail = backend_handle_mail,
 
274
        .start = backend_start,
 
275
        .rollback = backend_rollback,
 
276
        .commit = backend_commit,
 
277
};