Back to index

courier  0.68.2
Classes | Functions
comrwsearchdel.c File Reference
#include "courier.h"
#include "rw.h"

Go to the source code of this file.

Classes

struct  rw_searchdel_info

Functions

static void do_next_rw (struct rw_info *, struct rw_searchdel_info *)
static void del_err_func (int errnum, const char *errmsg, struct rw_info *i)
static void found_delivery (struct rw_info *i, const struct rfc822token *host, const struct rfc822token *addr)
static void call_next_rw (struct rw_info *i)
void rw_searchdel (struct rw_info *i, void(*func)(struct rw_info *, struct rw_transport *, const struct rfc822token *, const struct rfc822token *))

Function Documentation

static void call_next_rw ( struct rw_info *  i) [static]

Definition at line 43 of file comrwsearchdel.c.

{
struct rw_searchdel_info *p=(struct rw_searchdel_info *)i->udata;

       p->cur_transport=p->cur_transport->next;
       do_next_rw(i, p);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void del_err_func ( int  errnum,
const char *  errmsg,
struct rw_info *  i 
) [static]

Definition at line 20 of file comrwsearchdel.c.

{
struct rw_searchdel_info *p=(struct rw_searchdel_info *)i->udata;

       i->udata=p->save_udata;
       i->err_func=p->save_err_func;
       (*i->err_func)(errnum, errmsg, i);
       i->err_func=del_err_func;
       i->udata=(void *)p;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void do_next_rw ( struct rw_info *  i,
struct rw_searchdel_info di 
) [static]

Definition at line 51 of file comrwsearchdel.c.

{
       for ( ;di->cur_transport; di->cur_transport=di->cur_transport->next)
       {
              if (!di->cur_transport->rw_ptr)    continue;
              if (!di->cur_transport->rw_ptr->rewrite_del)     continue;
              (*di->cur_transport->rw_ptr->rewrite_del)(i, &call_next_rw,
                     &found_delivery);
              break;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void found_delivery ( struct rw_info *  i,
const struct rfc822token host,
const struct rfc822token addr 
) [static]

Definition at line 31 of file comrwsearchdel.c.

{
struct rw_searchdel_info *p=(struct rw_searchdel_info *)i->udata;

       i->udata=p->save_udata;
       i->err_func=p->save_err_func;
       (*p->del_func)(i, p->cur_transport, host, addr);
       i->err_func=del_err_func;
       i->udata=(void *)p;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void rw_searchdel ( struct rw_info *  i,
void(*)(struct rw_info *, struct rw_transport *, const struct rfc822token *, const struct rfc822token *)  func 
)

Definition at line 63 of file comrwsearchdel.c.

{
struct rw_searchdel_info rwsdi;

       rwsdi.cur_transport=rw_transport_first;
       rwsdi.save_udata=i->udata;
       rwsdi.save_err_func=i->err_func;
       i->udata= (void *)&rwsdi;
       i->err_func=del_err_func;
       rwsdi.del_func=func;
       do_next_rw(i, &rwsdi);
       i->udata=rwsdi.save_udata;
       i->err_func=rwsdi.save_err_func;
}

Here is the call graph for this function: