mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02: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
@ -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_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 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);
|
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);
|
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 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);
|
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;
|
extern int send_email_disabled;
|
||||||
|
|
||||||
int init_email_alert(struct mailers *mailers, struct proxy *p, char **err);
|
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, ...)
|
void send_email_alert(struct server *s, int priority, const char *format, ...)
|
||||||
__attribute__ ((format(printf, 3, 4)));
|
__attribute__ ((format(printf, 3, 4)));
|
||||||
|
|
||||||
|
@ -1259,14 +1259,6 @@ int cfg_parse_mailers(const char *file, int linenum, char **args, int kwm)
|
|||||||
return err_code;
|
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
|
int
|
||||||
cfg_parse_netns(const char *file, int linenum, char **args, int kwm)
|
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;
|
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,
|
static int enqueue_one_email_alert(struct proxy *p, struct server *s,
|
||||||
struct email_alertq *q, const char *msg)
|
struct email_alertq *q, const char *msg)
|
||||||
{
|
{
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <haproxy/http_htx.h>
|
#include <haproxy/http_htx.h>
|
||||||
#include <haproxy/http_ext.h>
|
#include <haproxy/http_ext.h>
|
||||||
#include <haproxy/http_rules.h>
|
#include <haproxy/http_rules.h>
|
||||||
|
#include <haproxy/mailers.h>
|
||||||
#include <haproxy/listener.h>
|
#include <haproxy/listener.h>
|
||||||
#include <haproxy/log.h>
|
#include <haproxy/log.h>
|
||||||
#include <haproxy/obj_type-t.h>
|
#include <haproxy/obj_type-t.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user