Commit 8860e991 authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

Merge branch 'master' into int-new

parents cc5b93f7 c8cafc8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ more_end(void)
}

static void
sig_handler(int signal)
sig_handler(int signal UNUSED)
{
  cleanup();
  exit(0);
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ vlog(const char *msg, va_list args)
  int n = vsnprintf(buf, sizeof(buf), msg, args);
  if (n < 0)
    snprintf(buf, sizeof(buf), "???");
  if (n >= sizeof(buf))
  else if (n >= (int) sizeof(buf))
    snprintf(buf + sizeof(buf) - 100, 100, " ... <too long>");
  fputs(buf, stderr);
  fputc('\n', stderr);
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ $(o)cf-lex.c: $(s)cf-lex.l
	$(FLEX) $(FLEX_DEBUG) -s -B -8 -Pcf_ -o$@ $<

$(o)cf-lex.o: $(o)cf-parse.tab.h $(o)keywords.h
$(o)cf-lex.o: CFLAGS+=-Wno-sign-compare -Wno-unused-function

$(addprefix $(o), cf-parse.y keywords.h commands.h cf-parse.tab.h cf-parse.tab.c cf-lex.c): $(objdir)/.dir-stamp

+4 −4
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ int undo_available; /* Undo was not requested from last reconfiguration */
 * further use. Returns a pointer to the structure.
 */
struct config *
config_alloc(byte *name)
config_alloc(const byte *name)
{
  pool *p = rp_new(&root_pool, "Config");
  linpool *l = lp_new(p, 4080);
@@ -450,7 +450,7 @@ config_undo(void)
extern void cmd_reconfig_undo_notify(void);

static void
config_timeout(struct timer *t)
config_timeout(struct timer *t UNUSED)
{
  log(L_INFO "Config timeout expired, starting undo");
  cmd_reconfig_undo_notify();
@@ -530,7 +530,7 @@ cf_error(const char *msg, ...)
 * and we want to preserve it for further use.
 */
char *
cfg_strdup(char *c)
cfg_strdup(const char *c)
{
  int l = strlen(c) + 1;
  char *z = cfg_allocu(l);
+3 −3
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ struct config {
  linpool *mem;				/* Linear pool containing configuration data */
  list protos;				/* Configured protocol instances (struct proto_config) */
  list tables;				/* Configured routing tables (struct rtable_config) */
  list logfiles;			/* Configured log fils (sysdep) */
  list logfiles;			/* Configured log files (sysdep) */

  int mrtdump_file;			/* Configured MRTDump file (sysdep, fd in unix) */
  char *syslog_name;			/* Name used for syslog (NULL -> no syslog) */
@@ -60,7 +60,7 @@ struct config {
extern struct config *config;		/* Currently active configuration */
extern struct config *new_config;	/* Configuration being parsed */

struct config *config_alloc(byte *name);
struct config *config_alloc(const byte *name);
int config_parse(struct config *);
int cli_parse(struct config *);
void config_free(struct config *);
@@ -94,7 +94,7 @@ extern linpool *cfg_mem;
#define cfg_alloc(size) lp_alloc(cfg_mem, size)
#define cfg_allocu(size) lp_allocu(cfg_mem, size)
#define cfg_allocz(size) lp_allocz(cfg_mem, size)
char *cfg_strdup(char *c);
char *cfg_strdup(const char *c);
void cfg_copy_list(list *dest, list *src, unsigned node_size);

/* Lexer */
Loading