Re: unexpected Apache::VMonitor output
[prev]
[thread]
[next]
[Date index for 2005/01/29]
Stas Bekman wrote:
[...]
> For now the following simply disables vhosts for Apache::DummyScoreboard
> (which is the one used when modperl is not loaded).
>
> Index: Scoreboard.xs
> ===================================================================
> --- Scoreboard.xs (revision 127)
> +++ Scoreboard.xs (working copy)
> @@ -32,8 +32,10 @@
> #define server_score_client(s) s->record.client
> #define server_score_request(s) s->record.request
>
> -#define server_score_vhost(s) \
> - s->record.vhostrec ? s->record.vhostrec->server_hostname : ""
> +#define server_score_vhost(s) \
> + s->record.vhostrec && ap_scoreboard_image \
> + ? s->record.vhostrec->server_hostname \
> + : ""
>
> #define parent_score_pid(s) s->record.pid
>
> I suppose we could copy the vhost record's string into:
>
> typedef struct {
> parent_score record;
> int idx;
> scoreboard *image;
> } Apache__parent_score;
>
> e.g. by adding:
>
> char [128] vhost;
>
> but it'll slow down the general case. So it probably requires some
> thinking. May be it could be optional and used only for external image
> fetching and referred to, if detected that we aren't running under
> Apache, e.g.:
>
> ap_scoreboard_image
> ? (s->record.vhostrec ? s->record.vhostrec->server_hostname : "")
> : (s->vhost)
>
Notice that under Apache2, vhost is a part of the record:
#define worker_score_vhost(mws) mws->record->vhost
so there are no problems there.
I'm not really interested in spending any more time on that vhost issue
for mp1. I see that I need to work the 2.x version, since
Apache::DummyScoreboard, required for outside-of-modperl environment is
not there. So I'll commit the patch that prevents the segfault (i.e.
disabling vhost for outside of modperl) and if someone wants to work on
finishing it, I'd gladly accept the patches.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
 |
(message missing)
|