From 8acc0ff48f675cf154987cfc11fe9ba7813eaf50 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 2 Nov 2007 13:13:03 +0000 Subject: Introduce configuration dependent number of parameters in a nicer way --- trackerlogic.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'trackerlogic.h') diff --git a/trackerlogic.h b/trackerlogic.h index 9cbffc1..7cf75b2 100644 --- a/trackerlogic.h +++ b/trackerlogic.h @@ -98,16 +98,18 @@ typedef struct { Exported functions */ +#ifdef WANT_TRACKER_SYNC +#define WANT_TRACKER_SYNC_PARAM( param ) , param +#else +#define WANT_TRACKER_SYNC_PARAM( param ) +#endif + int init_logic( const char * const serverdir ); void deinit_logic( void ); enum { STATS_MRTG, STATS_TOP5, STATS_DMEM, STATS_TCP, STATS_UDP, STATS_SLASH24S, STATS_SLASH24S_OLD, SYNC_IN, SYNC_OUT, STATS_FULLSCRAPE }; -#ifdef WANT_TRACKER_SYNC -ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer, int from_changeset ); -#else -ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer ); -#endif +ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_TRACKER_SYNC_PARAM( int from_changeset ) ); size_t remove_peer_from_torrent( ot_hash *hash, ot_peer *peer, char *reply, int is_tcp ); size_t return_peers_for_torrent( ot_torrent *torrent, size_t amount, char *reply, int is_tcp ); size_t return_fullscrape_for_tracker( char **reply ); -- cgit v1.2.3