mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-19 02:29:31 -05:00
REORG: mailers: move free_email_alert() to mailers.c
free_email_alert() was declared in cfgparse.c, but it should belong to mailers.c instead.
This commit is contained in:
parent
8e226682be
commit
ee8be55942
5 changed files with 10 additions and 9 deletions
|
|
@ -127,7 +127,6 @@ int too_many_args(int maxarg, char **args, char **msg, int *err_code);
|
|||
int alertif_too_many_args_idx(int maxarg, int index, const char *file, int linenum, char **args, int *err_code);
|
||||
int alertif_too_many_args(int maxarg, const char *file, int linenum, char **args, int *err_code);
|
||||
int parse_process_number(const char *arg, unsigned long *proc, int max, int *autoinc, char **err);
|
||||
void free_email_alert(struct proxy *p);
|
||||
const char *cfg_find_best_match(const char *word, const struct list *list, int section, const char **extra);
|
||||
int warnifnotcap(struct proxy *proxy, int cap, const char *file, int line, const char *arg, const char *hint);
|
||||
int failifnotcap(struct proxy *proxy, int cap, const char *file, int line, const char *arg, const char *hint);
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ extern struct mailers *mailers;
|
|||
extern int send_email_disabled;
|
||||
|
||||
int init_email_alert(struct mailers *mailers, struct proxy *p, char **err);
|
||||
void free_email_alert(struct proxy *p);
|
||||
void send_email_alert(struct server *s, int priority, const char *format, ...)
|
||||
__attribute__ ((format(printf, 3, 4)));
|
||||
|
||||
|
|
|
|||
|
|
@ -1259,14 +1259,6 @@ out:
|
|||
return err_code;
|
||||
}
|
||||
|
||||
void free_email_alert(struct proxy *p)
|
||||
{
|
||||
ha_free(&p->email_alert.mailers.name);
|
||||
ha_free(&p->email_alert.from);
|
||||
ha_free(&p->email_alert.to);
|
||||
ha_free(&p->email_alert.myhostname);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
cfg_parse_netns(const char *file, int linenum, char **args, int kwm)
|
||||
|
|
|
|||
|
|
@ -172,6 +172,14 @@ int init_email_alert(struct mailers *mls, struct proxy *p, char **err)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void free_email_alert(struct proxy *p)
|
||||
{
|
||||
ha_free(&p->email_alert.mailers.name);
|
||||
ha_free(&p->email_alert.from);
|
||||
ha_free(&p->email_alert.to);
|
||||
ha_free(&p->email_alert.myhostname);
|
||||
}
|
||||
|
||||
static int enqueue_one_email_alert(struct proxy *p, struct server *s,
|
||||
struct email_alertq *q, const char *msg)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include <haproxy/http_htx.h>
|
||||
#include <haproxy/http_ext.h>
|
||||
#include <haproxy/http_rules.h>
|
||||
#include <haproxy/mailers.h>
|
||||
#include <haproxy/listener.h>
|
||||
#include <haproxy/log.h>
|
||||
#include <haproxy/obj_type-t.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue