Ferenc Engard wrote:

> > As for the current mod_midgard you use (non-MMP), see attached patch.
> > It'll tell me what Midgard thinks the current sitegroup is as the
> > translation phase ends.
>
> Sorry, you didn't attach anything...

Here you go.

Emile
Index: mod_midgard.c
===================================================================
RCS file: /usr/local/cvs/midgard/mod/mod_midgard.c,v
retrieving revision 1.102
diff -u -r1.102 mod_midgard.c
--- mod_midgard.c       2002/01/26 15:36:17     1.102
+++ mod_midgard.c       2002/03/05 14:59:00
@@ -24,6 +24,7 @@
 #include <midgard/apache.h>
 #include <midgard/select_db.h>
 #include <midgard/authfailure.h>
+#include <midgard/internal.h>
 #include "http_core.h"
 #include "http_config.h"
 #include "http_protocol.h"
@@ -720,6 +721,10 @@
 #if HAVE_MIDGARD_SITEGROUPS
                ftstatus->sitegroup = atoi(mgd_colvalue(res, 5));
                mgd_set_sitegroup(rcfg->mgd, ftstatus->sitegroup);
+      fprintf(stderr, "http://%s:%d%s maps to host %d in SG %d\n",
+                                  ap_get_server_name(rcfg->req),
+                                  ap_get_server_port(rcfg->req),
+                                  rcfg->req->uri, rcfg->host, ftstatus->sitegroup);
 #endif
 
                if (prelen == 0) {
@@ -1216,6 +1221,7 @@
              rcfg->path = ap_pstrdup(rcfg->pool, subreq->filename);
 #if HAVE_MIDGARD_SITEGROUPS
                        mgd_set_sitegroup(rcfg->mgd, ftstatus->sitegroup);
+         fprintf(stderr, "try_filetemplates set SG %d\n", ftstatus->sitegroup);
 #endif
 
              tok = strrchr(subreq->path_info, '.');
@@ -1422,6 +1428,7 @@
 #if MIDGARD_PHP_REQUEST_CONFIG_BUG_WORKAROUND
        mgd_php_bug_workaround_set_rcfg_dcfg(rcfg, dcfg);
 #endif
+   fprintf(stderr, "Translation successful: now in SG %d\n", 
+rcfg->mgd->current_user->sitegroup);
        return OK;
 }
 
@@ -1506,6 +1513,7 @@
        rcfg.auth.passed = 0;
 #if HAVE_MIDGARD_SITEGROUPS
        mgd_set_sitegroup(rcfg.mgd, ftstatus.sitegroup);
+   fprintf(stderr, "midgard_host_auth set SG %d\n", ftstatus.sitegroup);
 #endif
    mgd_select_database(r, scfg->database.main, &rcfg, FALSE);
        if (midgard_authenticate(&rcfg) == AUTH_REQUIRED) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to