Properly initialize logging
[mod_auth_gssapi.git] / src / mod_auth_gssapi.c
index 5ce9077..f2fab57 100644 (file)
@@ -28,6 +28,8 @@
 
 module AP_MODULE_DECLARE_DATA auth_gssapi_module;
 
+APLOG_USE_MODULE(auth_gssapi);
+
 APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *));
 
 static char *mag_status(request_rec *req, int type, uint32_t err)
@@ -209,7 +211,9 @@ static int mag_auth(request_rec *req)
     }
 
     /* if available, session always supersedes connection bound data */
-    mag_check_session(req, cfg, &mc);
+    if (cfg->use_sessions) {
+        mag_check_session(req, cfg, &mc);
+    }
 
     if (mc) {
         /* register the context in the memory pool, so it can be freed
@@ -335,7 +339,9 @@ static int mag_auth(request_rec *req)
             vtime = MIN_SESS_EXP_TIME;
         }
         mc->expiration = time(NULL) + vtime;
-        mag_attempt_session(req, cfg, mc);
+        if (cfg->use_sessions) {
+            mag_attempt_session(req, cfg, mc);
+        }
     }
 
     ret = OK;