diff options
| author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-15 13:04:16 +0000 | 
|---|---|---|
| committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-15 13:04:16 +0000 | 
| commit | 369a532132e9c9f19e0dd07d2e2c554c92c70f67 (patch) | |
| tree | cae30551e044315d489a0e6d14db06ffc894090d | |
| parent | ba364998484de5a3ed37b843a8e34eacb2a21953 (diff) | |
| download | conntrack-tools-369a532132e9c9f19e0dd07d2e2c554c92c70f67.tar.gz conntrack-tools-369a532132e9c9f19e0dd07d2e2c554c92c70f67.zip | |
Max Kellermann <max@duempel.org>:
fix wrong invocations after prototype cleanup
| -rw-r--r-- | ChangeLog | 1 | ||||
| -rw-r--r-- | src/cache_timer.c | 2 | ||||
| -rw-r--r-- | src/stats-mode.c | 2 | ||||
| -rw-r--r-- | src/sync-mode.c | 23 | 
4 files changed, 15 insertions, 13 deletions
| @@ -53,6 +53,7 @@ o use list_for_each_entry() instead of list_for_each()  o use const when possible  o remove prefetch in slist.h since it confuses gcc  o fix illegal use of return in the yacc code, use break instead +o fix wrong invocations after prototype cleanup  version 0.9.5 (2007/07/29)  ------------------------------ diff --git a/src/cache_timer.c b/src/cache_timer.c index 02f3ae4..2379f4b 100644 --- a/src/cache_timer.c +++ b/src/cache_timer.c @@ -45,7 +45,7 @@ static void timer_add(struct us_conntrack *u, void *data)  static void timer_update(struct us_conntrack *u, void *data)  {  	struct alarm_list *alarm = data; -	mod_alarm(alarm, CONFIG(cache_timeout)); +	mod_alarm(alarm, CONFIG(cache_timeout), 0);  }  static void timer_destroy(struct us_conntrack *u, void *data) diff --git a/src/stats-mode.c b/src/stats-mode.c index 20efc95..de53751 100644 --- a/src/stats-mode.c +++ b/src/stats-mode.c @@ -84,7 +84,7 @@ static int local_handler_stats(int fd, int type, void *data)  		cache_flush(STATE_STATS(cache));  		break;  	case KILL: -		killer(); +		killer(0);  		break;  	case STATS:  		cache_stats(STATE_STATS(cache), fd); diff --git a/src/sync-mode.c b/src/sync-mode.c index d38d91f..c3630b6 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -31,7 +31,7 @@  static void do_mcast_handler_step(struct nethdr *net)  { -	unsigned int query; +	int query;  	struct netpld *pld = NETHDR_DATA(net);  	char __ct[nfct_maxsize()];  	struct nf_conntrack *ct = (struct nf_conntrack *) __ct; @@ -82,7 +82,7 @@ retry:  }  /* handler for multicast messages received */ -static void mcast_handler() +static void mcast_handler(void)  {  	int numbytes, remain;  	char __net[65536], *ptr = __net; /* XXX: maximum MTU for IPv4 */ @@ -116,8 +116,6 @@ static void mcast_handler()  static int init_sync(void)  { -	int ret; -  	state.sync = malloc(sizeof(struct ct_sync_state));  	if (!state.sync) {  		dlog(STATE(log), LOG_ERR, "can't allocate memory for sync"); @@ -212,7 +210,7 @@ static void run_sync(fd_set *readfds)  	mcast_buffered_pending_netmsg(STATE_SYNC(mcast_client));  } -static void kill_sync() +static void kill_sync(void)  {  	cache_destroy(STATE_SYNC(internal));  	cache_destroy(STATE_SYNC(external)); @@ -226,7 +224,7 @@ static void kill_sync()  		STATE_SYNC(sync)->kill();  } -static dump_stats_sync(int fd) +static void dump_stats_sync(int fd)  {  	char buf[512];  	int size; @@ -234,8 +232,8 @@ static dump_stats_sync(int fd)  	size = sprintf(buf, "multicast sequence tracking:\n"  			    "%20llu Pckts mfrm "  			    "%20llu Pckts lost\n\n", -			STATE(malformed), -			STATE_SYNC(packets_lost)); +			(unsigned long long)STATE(malformed), +			(unsigned long long)STATE_SYNC(packets_lost));  	send(fd, buf, size, 0);  } @@ -289,7 +287,7 @@ static int local_handler_sync(int fd, int type, void *data)  		cache_flush(STATE_SYNC(external));  		break;  	case KILL: -		killer(); +		killer(0);  		break;  	case STATS:  		cache_stats(STATE_SYNC(internal), fd); @@ -403,7 +401,7 @@ static int overrun_purge_step(void *data1, void *data2)  }  /* it's likely that we're losing events, just try to do our best here */ -static void overrun_sync() +static void overrun_sync(void)  {  	int ret;  	struct nfct_handle *h; @@ -481,8 +479,11 @@ static int event_destroy_sync(struct nf_conntrack *ct)  	if (cache_del(STATE_SYNC(internal), ct)) {  		mcast_send_sync(NULL, ct, NFCT_Q_DESTROY);  		debug_ct(ct, "internal destroy"); -	} else +		return 1; +	} else {  		debug_ct(ct, "can't destroy"); +		return 0; +	}  }  struct ct_mode sync_mode = { | 
