X-Git-Url: https://git.hcoop.net/hcoop/debian/libapache-mod-waklog.git/blobdiff_plain/3cb7bdb7c0ee5ae67ff85cc1d98134353d037553..4521ace19381873ac55216051d1863da6cfcd74b:/mod_waklog.c diff --git a/mod_waklog.c b/mod_waklog.c index 023028b..32bbaa7 100644 --- a/mod_waklog.c +++ b/mod_waklog.c @@ -10,6 +10,8 @@ #ifdef sun #include +#include +#include #elif linux #define use_pthreads #include @@ -31,9 +33,6 @@ /********************* APACHE1 ******************************************************************************/ #ifndef APACHE2 #include "ap_config.h" -#if defined(sun) -#include -#endif /* sun */ #include #define MK_POOL pool #define MK_TABLE_GET ap_table_get @@ -71,7 +70,7 @@ const char *userdata_key = "waklog_init"; /**************************************************************************************************/ #include -#include +#include #include @@ -164,18 +163,6 @@ int renewcount = 0; #define getModConfig(P, X) P = (waklog_config *) ap_get_module_config( (X)->module_config, &waklog_module ); -#include - -#if defined(sun) -#include -#endif /* sun */ -#include -#include -#include -#include -#include -#include - static void log_error (const char *file, int line, int level, int status, @@ -311,7 +298,7 @@ set_auth ( server_rec *s, request_rec *r, int self, char *principal, char *keyta #ifdef APACHE2 if ( ! ( r && r->connection && r->user )) { log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: self authentication selected, but no data available"); - log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: r->user=%s", (r->user==NULL ? "null" : r->user==NULL)); + log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: r->user=%s", (r->user==NULL ? "null" : r->user)); return -1; } @@ -346,7 +333,7 @@ set_auth ( server_rec *s, request_rec *r, int self, char *principal, char *keyta } #endif - log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: set_auth: k5user=%s", k5user ? k5user : "NULL"); + log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: set_auth: k5user=%s", k5user); mytime = time(0); /* see if we should just go ahead and ignore this call, since we already should be set to these @@ -417,7 +404,7 @@ set_auth ( server_rec *s, request_rec *r, int self, char *principal, char *keyta } /* if 'usecached' isn't set, we've got to get our tokens from somewhere... */ - if (( ! usecached ) && ( k5user )) { + if ( ! usecached ) { /* clear out the creds structure */ memset((void *) &v5creds, 0, sizeof(v5creds)); @@ -1112,7 +1099,7 @@ waklog_child_init (server_rec * s, MK_POOL * p) } if ( pag_for_children ) { - setpag (); + k_setpag (); } getModConfig (cfg, s); @@ -1350,7 +1337,7 @@ waklog_init_handler (apr_pool_t * p, apr_pool_t * plog, #define locktype rwlock_t #endif - if ( sharedlock = ( locktype * ) mmap ( NULL, sizeof(locktype), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0 ) ) { + if ( ( sharedlock = ( locktype * ) mmap ( NULL, sizeof(locktype), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0 ) ) != NULL ) { #ifndef use_pthreads rwlock_init(sharedlock, USYNC_PROCESS, NULL ); #else