Author: tjansen Date: Thu Oct 15 17:18:16 2009 New Revision: 1182 Log: Fix build with --enable-logging. - added #ifdef protection to log.h - fixed a renamed variable in conmgr.c - added missing include in sdregister.c Modified: trunk/include/log.h trunk/libpisa/conmgr.c trunk/pisasd/sdregister.c Modified: trunk/include/log.h ============================================================================== --- trunk/include/log.h Thu Oct 15 17:15:33 2009 (r1181) +++ trunk/include/log.h Thu Oct 15 17:18:16 2009 (r1182) @@ -13,6 +13,10 @@ #ifndef PISA_LOG_H #define PISA_LOG_H +/* Only offer logging functionality, if we were configured with the + * corresponding option */ +#ifdef CONFIG_PISA_LOGGING + #include <stdio.h> #include <time.h> @@ -36,4 +40,5 @@ void log_nat_mapping_end(const char *hit); void print_to_log(const char* fmt,...); +#endif /* CONFIG_PISA_LOGGING */ #endif /* PISA_LOG_H */ Modified: trunk/libpisa/conmgr.c ============================================================================== --- trunk/libpisa/conmgr.c Thu Oct 15 17:15:33 2009 (r1181) +++ trunk/libpisa/conmgr.c Thu Oct 15 17:18:16 2009 (r1182) @@ -187,7 +187,7 @@ #ifdef CONFIG_PISA_LOGGING char hit[INET6_ADDRSTRLEN]; /* log end of connection */ - inet_ntop(AF_INET6, &entry->address_control->sin6_addr, hit, INET6_ADDRSTRLEN); + inet_ntop(AF_INET6, &entry->hit, hit, INET6_ADDRSTRLEN); log_stop_connection(hit, entry->transferred_bytes, entry->start_time); #endif Modified: trunk/pisasd/sdregister.c ============================================================================== --- trunk/pisasd/sdregister.c Thu Oct 15 17:15:33 2009 (r1181) +++ trunk/pisasd/sdregister.c Thu Oct 15 17:18:16 2009 (r1182) @@ -14,6 +14,7 @@ #include "sdctx.h" #include "sdconf.h" #include "sdclients.h" +#include "log.h" /** * send an RegisterAck to a client.