You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by William A Rowe Jr <wr...@rowe-clan.net> on 2018/07/23 14:04:19 UTC
Re: Current trunk win build error
Perhaps use proxy_balancer_get_best_worker, and don't export
that? That can be the delegate for ap_proxy_balancer_get_best_worker.
We either keep callbacks local, or export them _NONSTD. All the
*_DECLARE (without _NONSTD) are not usable as apr/httpd
callbacks.
On Mon, Jul 23, 2018 at 7:22 AM, Plüm, Rüdiger, Vodafone Group <
ruediger.pluem@vodafone.com> wrote:
>
> > -----Ursprüngliche Nachricht-----
> > Von: Apache Lounge <in...@apachelounge.com>
> > Gesendet: Montag, 23. Juli 2018 13:35
> > An: dev@httpd.apache.org
> > Betreff: Current trunk win build error
> >
> >
> >
> >
> >
> > Error C2440 'initializing': cannot convert from 'proxy_worker
> > *(__stdcall *)(proxy_balancer *,request_rec
> > *,proxy_is_best_callback_fn_t (__cdecl *),void *)' to
> > 'apr_OFN_ap_proxy_balancer_get_best_worker_t (__cdecl *)'
> >
> > mod_proxy c:\vc15\win32\httpd-trunk\modules\proxy\proxy_util.c 4082
> >
>
> Windows experts to the rescue please :-)
> Seems to be an issue between PROXY_DECLARE and the optional function stuff.
> Does the following patch fix it (just guessing)?
>
> Index: mod_proxy.h
> ===================================================================
> --- mod_proxy.h (revision 1836460)
> +++ mod_proxy.h (working copy)
> @@ -883,7 +883,7 @@
> /*
> * Needed by the lb modules.
> */
> -APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_
> worker,
> +APR_DECLARE_OPTIONAL_FN(PROXY_DECLARE(proxy_worker *),
> ap_proxy_balancer_get_best_worker,
> (proxy_balancer *balancer,
> request_rec *r,
> proxy_is_best_callback_fn_t
> *is_best,
>
>
>
> Regards
>
> Rüdiger
>
Re: AW: AW: Current trunk win build error
Posted by Michal Karm <mi...@gmail.com>.
On 07/25/2018 10:56 AM, Plüm, Rüdiger, Vodafone Group wrote:
> Can you try again with latest trunk including r1836613? This should make [2] obsolete.
Thank you. I can confirm that [2] is not needed any more.
Changes:
[rpluem] * Forward port r1832855 missing in trunk.
>
> Regards
>
> Rüdiger
>
>> -----Ursprüngliche Nachricht-----
>> Von: Michal Karm <mi...@gmail.com>
>> Gesendet: Mittwoch, 25. Juli 2018 10:28
>> An: dev@httpd.apache.org; Plüm, Rüdiger, Vodafone Group
>> <ru...@vodafone.com>
>> Betreff: Re: AW: Current trunk win build error
>>
>> On 07/25/2018 08:24 AM, Plüm, Rüdiger, Vodafone Group wrote:
>>> r1836603
>>>
>>>
>>>
>>> @Windows folks: Can you please try if trunk mod_proxy builds again on
>> Windows?
>>>
>>>
>> I've never thought I would be replying to a call to Windows folks, but
>> here I go:
>>
>> It builds just fine on Windows with my particular CMake based setup [1],
>> with
>> this h2 patch still needed [2], because [3] is not pushed to trunk.
>> The build completes just fine, the Jenkins job fails on seeing errors in
>> the
>> error_log during smoke test, reported as [ASF BZ 62567].
>>
>>
>> From an email from Jenkins:
>>
>>> See <https://ci.modcluster.io/job/httpd-trunk-
>> windows/label=w2k12r2/21/display/redirect?page=changes>
>>> Changes:
>>>
>>> [ylavic] mod_proxy_http: forward 100-continue.
>>>
>>> [rpluem] * ap_proxy_balancer_get_best_worker cannot be exported and
>> used as an
>>> ------------------------------------------
>>> [...truncated 1.39 MB...]
>>> [Wed Jul 25 01:08:10.845360 2018] [core:error] [pid 3772:tid 3652]
>> [client ::1:56189] AH00082: an unknown filter was not added:
>> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLI
>> CY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
>>> [Wed Jul 25 01:08:10.848257 2018] [core:error] [pid 3772:tid 3652]
>> [client ::1:56189] AH00082: an unknown filter was not added:
>> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLI
>> CY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
>>> [Wed Jul 25 01:08:10.851255 2018] [core:error] [pid 3772:tid 3652]
>> [client ::1:56189] AH00082: an unknown filter was not added:
>> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLI
>> CY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
>>> [Wed Jul 25 01:08:10.854078 2018] [core:error] [pid 3772:tid 3652]
>> [client ::1:56189] AH00082: an unknown filter was not added:
>> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLI
>> CY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
>>
>>
>> Cheers
>> Karm
>>
>> [1]
>> https://github.com/modcluster/ci.modcluster.io/blob/master/windows/httpd
>> /build.bat
>> [2]
>> https://raw.githubusercontent.com/modcluster/ci.modcluster.io/master/win
>> dows/httpd/httpd-trunk_CMakeLists.txt.patch
>> [3]
>> https://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CMakeLists.txt?
>> r1=1832855&r2=1832854&pathrev=1832855
>> [ASF BZ 62567] https://bz.apache.org/bugzilla/show_bug.cgi?id=62567
>>
>>
>>> Regards
>>>
>>>
>>>
>>> Rüdiger
>>>
>>>
>>>
>>> *Von:*William A Rowe Jr <wr...@rowe-clan.net>
>>> *Gesendet:* Dienstag, 24. Juli 2018 18:16
>>> *An:* httpd <de...@httpd.apache.org>
>>> *Betreff:* Re: Current trunk win build error
>>>
>>>
>>>
>>> +1, looks great.
>>>
>>>
>>>
>>
>> Michal Karm Babacek
>>
>> --
>> Sent from my Hosaka Ono-Sendai Cyberspace 7
>>
Michal Karm Babacek
--
Sent from my Hosaka Ono-Sendai Cyberspace 7
AW: AW: Current trunk win build error
Posted by Plüm,
Rüdiger,
Vodafone Group <ru...@vodafone.com>.
Can you try again with latest trunk including r1836613? This should make [2] obsolete.
Regards
Rüdiger
> -----Ursprüngliche Nachricht-----
> Von: Michal Karm <mi...@gmail.com>
> Gesendet: Mittwoch, 25. Juli 2018 10:28
> An: dev@httpd.apache.org; Plüm, Rüdiger, Vodafone Group
> <ru...@vodafone.com>
> Betreff: Re: AW: Current trunk win build error
>
> On 07/25/2018 08:24 AM, Plüm, Rüdiger, Vodafone Group wrote:
> >
> > r1836603
> >
> >
> >
> > @Windows folks: Can you please try if trunk mod_proxy builds again on
> Windows?
> >
> >
> >
>
> I've never thought I would be replying to a call to Windows folks, but
> here I go:
>
> It builds just fine on Windows with my particular CMake based setup [1],
> with
> this h2 patch still needed [2], because [3] is not pushed to trunk.
> The build completes just fine, the Jenkins job fails on seeing errors in
> the
> error_log during smoke test, reported as [ASF BZ 62567].
>
>
> From an email from Jenkins:
>
> > See <https://ci.modcluster.io/job/httpd-trunk-
> windows/label=w2k12r2/21/display/redirect?page=changes>
> >
> > Changes:
> >
> > [ylavic] mod_proxy_http: forward 100-continue.
> >
> > [rpluem] * ap_proxy_balancer_get_best_worker cannot be exported and
> used as an
> >
> > ------------------------------------------
> > [...truncated 1.39 MB...]
> > [Wed Jul 25 01:08:10.845360 2018] [core:error] [pid 3772:tid 3652]
> [client ::1:56189] AH00082: an unknown filter was not added:
> >
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLI
> CY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
> > [Wed Jul 25 01:08:10.848257 2018] [core:error] [pid 3772:tid 3652]
> [client ::1:56189] AH00082: an unknown filter was not added:
> >
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLI
> CY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
> > [Wed Jul 25 01:08:10.851255 2018] [core:error] [pid 3772:tid 3652]
> [client ::1:56189] AH00082: an unknown filter was not added:
> >
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLI
> CY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
> > [Wed Jul 25 01:08:10.854078 2018] [core:error] [pid 3772:tid 3652]
> [client ::1:56189] AH00082: an unknown filter was not added:
> >
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLI
> CY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
>
>
> Cheers
> Karm
>
> [1]
> https://github.com/modcluster/ci.modcluster.io/blob/master/windows/httpd
> /build.bat
> [2]
> https://raw.githubusercontent.com/modcluster/ci.modcluster.io/master/win
> dows/httpd/httpd-trunk_CMakeLists.txt.patch
> [3]
> https://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CMakeLists.txt?
> r1=1832855&r2=1832854&pathrev=1832855
> [ASF BZ 62567] https://bz.apache.org/bugzilla/show_bug.cgi?id=62567
>
>
> > Regards
> >
> >
> >
> > Rüdiger
> >
> >
> >
> > *Von:*William A Rowe Jr <wr...@rowe-clan.net>
> > *Gesendet:* Dienstag, 24. Juli 2018 18:16
> > *An:* httpd <de...@httpd.apache.org>
> > *Betreff:* Re: Current trunk win build error
> >
> >
> >
> > +1, looks great.
> >
> >
> >
>
>
> Michal Karm Babacek
>
> --
> Sent from my Hosaka Ono-Sendai Cyberspace 7
>
Re: AW: Current trunk win build error
Posted by Michal Karm <mi...@gmail.com>.
On 07/25/2018 08:24 AM, Plüm, Rüdiger, Vodafone Group wrote:
>
> r1836603
>
>
>
> @Windows folks: Can you please try if trunk mod_proxy builds again on Windows?
>
>
>
I've never thought I would be replying to a call to Windows folks, but here I go:
It builds just fine on Windows with my particular CMake based setup [1], with
this h2 patch still needed [2], because [3] is not pushed to trunk.
The build completes just fine, the Jenkins job fails on seeing errors in the
error_log during smoke test, reported as [ASF BZ 62567].
From an email from Jenkins:
> See <https://ci.modcluster.io/job/httpd-trunk-windows/label=w2k12r2/21/display/redirect?page=changes>
>
> Changes:
>
> [ylavic] mod_proxy_http: forward 100-continue.
>
> [rpluem] * ap_proxy_balancer_get_best_worker cannot be exported and used as an
>
> ------------------------------------------
> [...truncated 1.39 MB...]
> [Wed Jul 25 01:08:10.845360 2018] [core:error] [pid 3772:tid 3652] [client ::1:56189] AH00082: an unknown filter was not added:
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLICY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
> [Wed Jul 25 01:08:10.848257 2018] [core:error] [pid 3772:tid 3652] [client ::1:56189] AH00082: an unknown filter was not added:
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLICY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
> [Wed Jul 25 01:08:10.851255 2018] [core:error] [pid 3772:tid 3652] [client ::1:56189] AH00082: an unknown filter was not added:
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLICY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
> [Wed Jul 25 01:08:10.854078 2018] [core:error] [pid 3772:tid 3652] [client ::1:56189] AH00082: an unknown filter was not added:
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLICY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
Cheers
Karm
[1]
https://github.com/modcluster/ci.modcluster.io/blob/master/windows/httpd/build.bat
[2]
https://raw.githubusercontent.com/modcluster/ci.modcluster.io/master/windows/httpd/httpd-trunk_CMakeLists.txt.patch
[3]
https://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CMakeLists.txt?r1=1832855&r2=1832854&pathrev=1832855
[ASF BZ 62567] https://bz.apache.org/bugzilla/show_bug.cgi?id=62567
> Regards
>
>
>
> Rüdiger
>
>
>
> *Von:*William A Rowe Jr <wr...@rowe-clan.net>
> *Gesendet:* Dienstag, 24. Juli 2018 18:16
> *An:* httpd <de...@httpd.apache.org>
> *Betreff:* Re: Current trunk win build error
>
>
>
> +1, looks great.
>
>
>
Michal Karm Babacek
--
Sent from my Hosaka Ono-Sendai Cyberspace 7
AW: Current trunk win build error
Posted by Plüm,
Rüdiger,
Vodafone Group <ru...@vodafone.com>.
r1836603
@Windows folks: Can you please try if trunk mod_proxy builds again on Windows?
Regards
Rüdiger
Von: William A Rowe Jr <wr...@rowe-clan.net>
Gesendet: Dienstag, 24. Juli 2018 18:16
An: httpd <de...@httpd.apache.org>
Betreff: Re: Current trunk win build error
+1, looks great.
Re: Current trunk win build error
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
+1, looks great.
On Tue, Jul 24, 2018 at 1:34 AM, Plüm, Rüdiger, Vodafone Group <
ruediger.pluem@vodafone.com> wrote:
> Unfortunately this did not work and caused.
>
>
>
> In file included from mod_proxy.h:30:0,
>
> from proxy_util.c:18:
>
> proxy_util.c: In function 'proxy_util_register_hooks':
>
> /home/pluem/apache/httpd-trunk/srclib/apr/include/apr_optional.h:42:36:
> error: unknown type name 'apr_OFN_proxy_balancer_get_best_worker_t'
>
> #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
>
> ^
>
> /home/pluem/apache/httpd-trunk/srclib/apr/include/apr_optional.h:71:3:
> note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
>
> APR_OPTIONAL_FN_TYPE(name) *apu__opt = name; \
>
> ^
>
> proxy_util.c:4094:5: note: in expansion of macro 'APR_REGISTER_OPTIONAL_FN'
>
> APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
>
> ^
>
> proxy_util.c:4094:30: warning: initialization from incompatible pointer
> type [enabled by default]
>
> APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
>
> ^
>
> /home/pluem/apache/httpd-trunk/srclib/apr/include/apr_optional.h:71:42:
> note: in definition of macro 'APR_REGISTER_OPTIONAL_FN'
>
> APR_OPTIONAL_FN_TYPE(name) *apu__opt = name; \
>
> ^
>
> make[4]: *** [proxy_util.slo] Error 1
>
> make[3]: *** [shared-build-recursive] Error 1
>
> make[2]: *** [shared-build-recursive] Error 1
>
> make[1]: *** [shared-build-recursive] Error 1
>
> make: *** [all-recursive] Error 1
>
>
>
> The attached one which is shorter then my original one, but longer than
> yours and does work.
>
>
>
>
>
>
>
> Regards
>
>
>
> Rüdiger
>
>
>
> *Von:* William A Rowe Jr <wr...@rowe-clan.net>
> *Gesendet:* Montag, 23. Juli 2018 16:54
>
> *An:* httpd <de...@httpd.apache.org>
> *Betreff:* Re: Current trunk win build error
>
>
>
> I think it's simply the attached (couldn't apply the inline text patch).
>
>
>
> No need to change the hook name.
>
>
>
> On Mon, Jul 23, 2018 at 9:16 AM, Plüm, Rüdiger, Vodafone Group <
> ruediger.pluem@vodafone.com> wrote:
>
> So something like the below?
>
>
>
> Regards
>
>
>
> Rüdiger
>
>
>
> Index: modules/proxy/balancers/mod_lbmethod_bybusyness.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_bybusyness.c (revision
> 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_bybusyness.c (working copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_bybusyness_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_bybusyness(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -47,7 +47,7 @@
>
> {
>
> int total_factor = 0;
>
> proxy_worker *worker =
>
> - ap_proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bybusyness,
>
> + proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bybusyness,
>
> &total_factor);
>
> if (worker) {
>
> @@ -96,9 +96,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_
> worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_
> worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10151)
>
> "mod_proxy must be loaded for
> mod_lbmethod_bybusyness");
>
> return !OK;
>
> Index: modules/proxy/balancers/mod_lbmethod_byrequests.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_byrequests.c (revision
> 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_byrequests.c (working copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_byrequests_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_byrequests(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -84,7 +84,7 @@
>
> request_rec *r)
>
> {
>
> int total_factor = 0;
>
> - proxy_worker *worker = ap_proxy_balancer_get_best_worker_fn(balancer,
> r, is_best_byrequests, &total_factor);
>
> + proxy_worker *worker = proxy_balancer_get_best_worker_fn(balancer,
> r, is_best_byrequests, &total_factor);
>
> if (worker) {
>
> worker->s->lbstatus -= total_factor;
>
> @@ -137,9 +137,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_
> worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_
> worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10152)
>
> "mod_proxy must be loaded for
> mod_lbmethod_byrequests");
>
> return !OK;
>
> Index: modules/proxy/balancers/mod_lbmethod_bytraffic.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_bytraffic.c
> (revision 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_bytraffic.c (working
> copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_bytraffic_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_bytraffic(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -62,7 +62,7 @@
>
> {
>
> apr_off_t min_traffic = 0;
>
> - return ap_proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bytraffic,
>
> + return proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bytraffic,
>
> &min_traffic);
>
> }
>
> @@ -107,9 +107,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_
> worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_
> worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10150)
>
> "mod_proxy must be loaded for
> mod_lbmethod_bytraffic");
>
> return !OK;
>
> Index: modules/proxy/mod_proxy.h
>
> ===================================================================
>
> --- modules/proxy/mod_proxy.h (revision 1836460)
>
> +++ modules/proxy/mod_proxy.h (working copy)
>
> @@ -883,7 +883,7 @@
>
> /*
>
> * Needed by the lb modules.
>
> */
>
> -APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_
> worker,
>
> +APR_DECLARE_OPTIONAL_FN(proxy_worker *, proxy_balancer_get_best_worker,
>
> (proxy_balancer *balancer,
>
> request_rec *r,
>
> proxy_is_best_callback_fn_t
> *is_best,
>
> Index: modules/proxy/proxy_util.c
>
> ===================================================================
>
> --- modules/proxy/proxy_util.c (revision 1836460)
>
> +++ modules/proxy/proxy_util.c (working copy)
>
> @@ -1415,6 +1415,13 @@
>
> return best_worker;
>
> }
>
> +static proxy_worker* proxy_balancer_get_best_worker(proxy_balancer
> *balancer,
>
> +
> request_rec *r,
>
> +
> proxy_is_best_callback_fn_t *is_best,
>
> + void
> *baton)
>
> +{
>
> + return ap_proxy_balancer_get_best_worker(balancer, r, is_best,
> baton);
>
> +}
>
> /*
>
> * CONNECTION related...
>
> */
>
> @@ -4079,5 +4086,5 @@
>
> {
>
> APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);
>
> APR_REGISTER_OPTIONAL_FN(ap_proxy_clear_connection);
>
> - APR_REGISTER_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
>
> + APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
>
> }
>
>
>
> *Von:* William A Rowe Jr <wr...@rowe-clan.net>
> *Gesendet:* Montag, 23. Juli 2018 16:04
> *An:* httpd <de...@httpd.apache.org>
> *Betreff:* Re: Current trunk win build error
>
>
>
> Perhaps use proxy_balancer_get_best_worker, and don't export
>
> that? That can be the delegate for ap_proxy_balancer_get_best_worker.
>
>
>
> We either keep callbacks local, or export them _NONSTD. All the
>
> *_DECLARE (without _NONSTD) are not usable as apr/httpd
>
> callbacks.
>
>
>
>
>
> On Mon, Jul 23, 2018 at 7:22 AM, Plüm, Rüdiger, Vodafone Group <
> ruediger.pluem@vodafone.com> wrote:
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Apache Lounge <in...@apachelounge.com>
> > Gesendet: Montag, 23. Juli 2018 13:35
> > An: dev@httpd.apache.org
> > Betreff: Current trunk win build error
>
> >
> >
> >
> >
> >
> > Error C2440 'initializing': cannot convert from 'proxy_worker
> > *(__stdcall *)(proxy_balancer *,request_rec
> > *,proxy_is_best_callback_fn_t (__cdecl *),void *)' to
> > 'apr_OFN_ap_proxy_balancer_get_best_worker_t (__cdecl *)'
> >
> > mod_proxy c:\vc15\win32\httpd-trunk\modules\proxy\proxy_util.c 4082
> >
>
> Windows experts to the rescue please :-)
> Seems to be an issue between PROXY_DECLARE and the optional function stuff.
> Does the following patch fix it (just guessing)?
>
> Index: mod_proxy.h
> ===================================================================
> --- mod_proxy.h (revision 1836460)
> +++ mod_proxy.h (working copy)
> @@ -883,7 +883,7 @@
> /*
> * Needed by the lb modules.
> */
> -APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_
> worker,
> +APR_DECLARE_OPTIONAL_FN(PROXY_DECLARE(proxy_worker *),
> ap_proxy_balancer_get_best_worker,
> (proxy_balancer *balancer,
> request_rec *r,
> proxy_is_best_callback_fn_t
> *is_best,
>
>
>
> Regards
>
> Rüdiger
>
>
>
>
>
AW: Current trunk win build error
Posted by Plüm,
Rüdiger,
Vodafone Group <ru...@vodafone.com>.
Unfortunately this did not work and caused.
In file included from mod_proxy.h:30:0,
from proxy_util.c:18:
proxy_util.c: In function 'proxy_util_register_hooks':
/home/pluem/apache/httpd-trunk/srclib/apr/include/apr_optional.h:42:36: error: unknown type name 'apr_OFN_proxy_balancer_get_best_worker_t'
#define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
^
/home/pluem/apache/httpd-trunk/srclib/apr/include/apr_optional.h:71:3: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
APR_OPTIONAL_FN_TYPE(name) *apu__opt = name; \
^
proxy_util.c:4094:5: note: in expansion of macro 'APR_REGISTER_OPTIONAL_FN'
APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
^
proxy_util.c:4094:30: warning: initialization from incompatible pointer type [enabled by default]
APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
^
/home/pluem/apache/httpd-trunk/srclib/apr/include/apr_optional.h:71:42: note: in definition of macro 'APR_REGISTER_OPTIONAL_FN'
APR_OPTIONAL_FN_TYPE(name) *apu__opt = name; \
^
make[4]: *** [proxy_util.slo] Error 1
make[3]: *** [shared-build-recursive] Error 1
make[2]: *** [shared-build-recursive] Error 1
make[1]: *** [shared-build-recursive] Error 1
make: *** [all-recursive] Error 1
The attached one which is shorter then my original one, but longer than yours and does work.
Regards
Rüdiger
Von: William A Rowe Jr <wr...@rowe-clan.net>
Gesendet: Montag, 23. Juli 2018 16:54
An: httpd <de...@httpd.apache.org>
Betreff: Re: Current trunk win build error
I think it's simply the attached (couldn't apply the inline text patch).
No need to change the hook name.
On Mon, Jul 23, 2018 at 9:16 AM, Plüm, Rüdiger, Vodafone Group <ru...@vodafone.com>> wrote:
So something like the below?
Regards
Rüdiger
Index: modules/proxy/balancers/mod_lbmethod_bybusyness.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_bybusyness.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_bybusyness.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_bybusyness_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_bybusyness(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -47,7 +47,7 @@
{
int total_factor = 0;
proxy_worker *worker =
- ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_bybusyness,
+ proxy_balancer_get_best_worker_fn(balancer, r, is_best_bybusyness,
&total_factor);
if (worker) {
@@ -96,9 +96,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10151)
"mod_proxy must be loaded for mod_lbmethod_bybusyness");
return !OK;
Index: modules/proxy/balancers/mod_lbmethod_byrequests.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_byrequests.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_byrequests.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_byrequests_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_byrequests(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -84,7 +84,7 @@
request_rec *r)
{
int total_factor = 0;
- proxy_worker *worker = ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_byrequests, &total_factor);
+ proxy_worker *worker = proxy_balancer_get_best_worker_fn(balancer, r, is_best_byrequests, &total_factor);
if (worker) {
worker->s->lbstatus -= total_factor;
@@ -137,9 +137,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10152)
"mod_proxy must be loaded for mod_lbmethod_byrequests");
return !OK;
Index: modules/proxy/balancers/mod_lbmethod_bytraffic.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_bytraffic.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_bytraffic.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_bytraffic_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_bytraffic(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -62,7 +62,7 @@
{
apr_off_t min_traffic = 0;
- return ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_bytraffic,
+ return proxy_balancer_get_best_worker_fn(balancer, r, is_best_bytraffic,
&min_traffic);
}
@@ -107,9 +107,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10150)
"mod_proxy must be loaded for mod_lbmethod_bytraffic");
return !OK;
Index: modules/proxy/mod_proxy.h
===================================================================
--- modules/proxy/mod_proxy.h (revision 1836460)
+++ modules/proxy/mod_proxy.h (working copy)
@@ -883,7 +883,7 @@
/*
* Needed by the lb modules.
*/
-APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_worker,
+APR_DECLARE_OPTIONAL_FN(proxy_worker *, proxy_balancer_get_best_worker,
(proxy_balancer *balancer,
request_rec *r,
proxy_is_best_callback_fn_t *is_best,
Index: modules/proxy/proxy_util.c
===================================================================
--- modules/proxy/proxy_util.c (revision 1836460)
+++ modules/proxy/proxy_util.c (working copy)
@@ -1415,6 +1415,13 @@
return best_worker;
}
+static proxy_worker* proxy_balancer_get_best_worker(proxy_balancer *balancer,
+ request_rec *r,
+ proxy_is_best_callback_fn_t *is_best,
+ void *baton)
+{
+ return ap_proxy_balancer_get_best_worker(balancer, r, is_best, baton);
+}
/*
* CONNECTION related...
*/
@@ -4079,5 +4086,5 @@
{
APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);
APR_REGISTER_OPTIONAL_FN(ap_proxy_clear_connection);
- APR_REGISTER_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
+ APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
}
Von: William A Rowe Jr <wr...@rowe-clan.net>>
Gesendet: Montag, 23. Juli 2018 16:04
An: httpd <de...@httpd.apache.org>>
Betreff: Re: Current trunk win build error
Perhaps use proxy_balancer_get_best_worker, and don't export
that? That can be the delegate for ap_proxy_balancer_get_best_worker.
We either keep callbacks local, or export them _NONSTD. All the
*_DECLARE (without _NONSTD) are not usable as apr/httpd
callbacks.
On Mon, Jul 23, 2018 at 7:22 AM, Plüm, Rüdiger, Vodafone Group <ru...@vodafone.com>> wrote:
> -----Ursprüngliche Nachricht-----
> Von: Apache Lounge <in...@apachelounge.com>>
> Gesendet: Montag, 23. Juli 2018 13:35
> An: dev@httpd.apache.org<ma...@httpd.apache.org>
> Betreff: Current trunk win build error
>
>
>
>
>
> Error C2440 'initializing': cannot convert from 'proxy_worker
> *(__stdcall *)(proxy_balancer *,request_rec
> *,proxy_is_best_callback_fn_t (__cdecl *),void *)' to
> 'apr_OFN_ap_proxy_balancer_get_best_worker_t (__cdecl *)'
>
> mod_proxy c:\vc15\win32\httpd-trunk\modules\proxy\proxy_util.c 4082
>
Windows experts to the rescue please :-)
Seems to be an issue between PROXY_DECLARE and the optional function stuff.
Does the following patch fix it (just guessing)?
Index: mod_proxy.h
===================================================================
--- mod_proxy.h (revision 1836460)
+++ mod_proxy.h (working copy)
@@ -883,7 +883,7 @@
/*
* Needed by the lb modules.
*/
-APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_worker,
+APR_DECLARE_OPTIONAL_FN(PROXY_DECLARE(proxy_worker *), ap_proxy_balancer_get_best_worker,
(proxy_balancer *balancer,
request_rec *r,
proxy_is_best_callback_fn_t *is_best,
Regards
Rüdiger
AW: Current trunk win build error
Posted by Plüm,
Rüdiger,
Vodafone Group <ru...@vodafone.com>.
Looks better than mine, but as we register the function with a different name we need to adjust the parameter to the APR_RETRIEVE_OPTIONAL_FN macro in all mod_lbmethod modules as I did, correct?
Regards
Rüdiger
Von: William A Rowe Jr <wr...@rowe-clan.net>
Gesendet: Montag, 23. Juli 2018 16:54
An: httpd <de...@httpd.apache.org>
Betreff: Re: Current trunk win build error
I think it's simply the attached (couldn't apply the inline text patch).
No need to change the hook name.
On Mon, Jul 23, 2018 at 9:16 AM, Plüm, Rüdiger, Vodafone Group <ru...@vodafone.com>> wrote:
So something like the below?
Regards
Rüdiger
Index: modules/proxy/balancers/mod_lbmethod_bybusyness.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_bybusyness.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_bybusyness.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_bybusyness_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_bybusyness(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -47,7 +47,7 @@
{
int total_factor = 0;
proxy_worker *worker =
- ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_bybusyness,
+ proxy_balancer_get_best_worker_fn(balancer, r, is_best_bybusyness,
&total_factor);
if (worker) {
@@ -96,9 +96,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10151)
"mod_proxy must be loaded for mod_lbmethod_bybusyness");
return !OK;
Index: modules/proxy/balancers/mod_lbmethod_byrequests.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_byrequests.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_byrequests.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_byrequests_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_byrequests(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -84,7 +84,7 @@
request_rec *r)
{
int total_factor = 0;
- proxy_worker *worker = ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_byrequests, &total_factor);
+ proxy_worker *worker = proxy_balancer_get_best_worker_fn(balancer, r, is_best_byrequests, &total_factor);
if (worker) {
worker->s->lbstatus -= total_factor;
@@ -137,9 +137,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10152)
"mod_proxy must be loaded for mod_lbmethod_byrequests");
return !OK;
Index: modules/proxy/balancers/mod_lbmethod_bytraffic.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_bytraffic.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_bytraffic.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_bytraffic_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_bytraffic(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -62,7 +62,7 @@
{
apr_off_t min_traffic = 0;
- return ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_bytraffic,
+ return proxy_balancer_get_best_worker_fn(balancer, r, is_best_bytraffic,
&min_traffic);
}
@@ -107,9 +107,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10150)
"mod_proxy must be loaded for mod_lbmethod_bytraffic");
return !OK;
Index: modules/proxy/mod_proxy.h
===================================================================
--- modules/proxy/mod_proxy.h (revision 1836460)
+++ modules/proxy/mod_proxy.h (working copy)
@@ -883,7 +883,7 @@
/*
* Needed by the lb modules.
*/
-APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_worker,
+APR_DECLARE_OPTIONAL_FN(proxy_worker *, proxy_balancer_get_best_worker,
(proxy_balancer *balancer,
request_rec *r,
proxy_is_best_callback_fn_t *is_best,
Index: modules/proxy/proxy_util.c
===================================================================
--- modules/proxy/proxy_util.c (revision 1836460)
+++ modules/proxy/proxy_util.c (working copy)
@@ -1415,6 +1415,13 @@
return best_worker;
}
+static proxy_worker* proxy_balancer_get_best_worker(proxy_balancer *balancer,
+ request_rec *r,
+ proxy_is_best_callback_fn_t *is_best,
+ void *baton)
+{
+ return ap_proxy_balancer_get_best_worker(balancer, r, is_best, baton);
+}
/*
* CONNECTION related...
*/
@@ -4079,5 +4086,5 @@
{
APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);
APR_REGISTER_OPTIONAL_FN(ap_proxy_clear_connection);
- APR_REGISTER_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
+ APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
}
Von: William A Rowe Jr <wr...@rowe-clan.net>>
Gesendet: Montag, 23. Juli 2018 16:04
An: httpd <de...@httpd.apache.org>>
Betreff: Re: Current trunk win build error
Perhaps use proxy_balancer_get_best_worker, and don't export
that? That can be the delegate for ap_proxy_balancer_get_best_worker.
We either keep callbacks local, or export them _NONSTD. All the
*_DECLARE (without _NONSTD) are not usable as apr/httpd
callbacks.
On Mon, Jul 23, 2018 at 7:22 AM, Plüm, Rüdiger, Vodafone Group <ru...@vodafone.com>> wrote:
> -----Ursprüngliche Nachricht-----
> Von: Apache Lounge <in...@apachelounge.com>>
> Gesendet: Montag, 23. Juli 2018 13:35
> An: dev@httpd.apache.org<ma...@httpd.apache.org>
> Betreff: Current trunk win build error
>
>
>
>
>
> Error C2440 'initializing': cannot convert from 'proxy_worker
> *(__stdcall *)(proxy_balancer *,request_rec
> *,proxy_is_best_callback_fn_t (__cdecl *),void *)' to
> 'apr_OFN_ap_proxy_balancer_get_best_worker_t (__cdecl *)'
>
> mod_proxy c:\vc15\win32\httpd-trunk\modules\proxy\proxy_util.c 4082
>
Windows experts to the rescue please :-)
Seems to be an issue between PROXY_DECLARE and the optional function stuff.
Does the following patch fix it (just guessing)?
Index: mod_proxy.h
===================================================================
--- mod_proxy.h (revision 1836460)
+++ mod_proxy.h (working copy)
@@ -883,7 +883,7 @@
/*
* Needed by the lb modules.
*/
-APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_worker,
+APR_DECLARE_OPTIONAL_FN(PROXY_DECLARE(proxy_worker *), ap_proxy_balancer_get_best_worker,
(proxy_balancer *balancer,
request_rec *r,
proxy_is_best_callback_fn_t *is_best,
Regards
Rüdiger
AW: Current trunk win build error
Posted by Plüm,
Rüdiger,
Vodafone Group <ru...@vodafone.com>.
Replied in bugzilla. Question to our fellow Windows builders: Any issues to compile 2.4.34 currently in the way described in
https://bz.apache.org/bugzilla/show_bug.cgi?id=62557#c5
Regards
Rüdiger
> -----Ursprüngliche Nachricht-----
> Von: Michal Karm <mi...@gmail.com>
> Gesendet: Dienstag, 24. Juli 2018 07:54
> An: dev@httpd.apache.org
> Cc: William A Rowe Jr <wr...@rowe-clan.net>
> Betreff: Re: Current trunk win build error
>
> Seeing "Rüdiger" (Hello!), "proxy_util" and "win" compels me to ask:
> Is this in any way related to [1] too? Should I be playing with this
> patch as well?
> How come you get pass the mod_http2 error with proxy_util.c?
>
> I hope the thread won't catch on fire in CMake/.dsp/.sln/.vcxproj
> flames :)
>
> [1] https://bz.apache.org/bugzilla/show_bug.cgi?id=62557#c5
>
> Karm
>
Re: Current trunk win build error
Posted by Michal Karm <mi...@gmail.com>.
Seeing "Rüdiger" (Hello!), "proxy_util" and "win" compels me to ask:
Is this in any way related to [1] too? Should I be playing with this patch as well?
How come you get pass the mod_http2 error with proxy_util.c?
I hope the thread won't catch on fire in CMake/.dsp/.sln/.vcxproj flames :)
[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=62557#c5
Karm
On 07/23/2018 04:53 PM, William A Rowe Jr wrote:
> I think it's simply the attached (couldn't apply the inline text patch).
>
> No need to change the hook name.
>
> On Mon, Jul 23, 2018 at 9:16 AM, Plüm, Rüdiger, Vodafone Group
> <ruediger.pluem@vodafone.com <ma...@vodafone.com>> wrote:
>
> So something like the below?
>
>
>
> Regards
>
>
>
> Rüdiger
>
>
>
> Index: modules/proxy/balancers/mod_lbmethod_bybusyness.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_bybusyness.c (revision 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_bybusyness.c (working copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_bybusyness_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_bybusyness(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -47,7 +47,7 @@
>
> {
>
> int total_factor = 0;
>
> proxy_worker *worker =
>
> - ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_bybusyness,
>
> + proxy_balancer_get_best_worker_fn(balancer, r, is_best_bybusyness,
>
> &total_factor);
>
> if (worker) {
>
> @@ -96,9 +96,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10151)
>
> "mod_proxy must be loaded for mod_lbmethod_bybusyness");
>
> return !OK;
>
> Index: modules/proxy/balancers/mod_lbmethod_byrequests.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_byrequests.c (revision
> 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_byrequests.c (working copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_byrequests_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_byrequests(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -84,7 +84,7 @@
>
> request_rec *r)
>
> {
>
> int total_factor = 0;
>
> - proxy_worker *worker = ap_proxy_balancer_get_best_worker_fn(balancer,
> r, is_best_byrequests, &total_factor);
>
> + proxy_worker *worker = proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_byrequests, &total_factor);
>
> if (worker) {
>
> worker->s->lbstatus -= total_factor;
>
> @@ -137,9 +137,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10152)
>
> "mod_proxy must be loaded for mod_lbmethod_byrequests");
>
> return !OK;
>
> Index: modules/proxy/balancers/mod_lbmethod_bytraffic.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_bytraffic.c (revision
> 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_bytraffic.c (working copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_bytraffic_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_bytraffic(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -62,7 +62,7 @@
>
> {
>
> apr_off_t min_traffic = 0;
>
> - return ap_proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bytraffic,
>
> + return proxy_balancer_get_best_worker_fn(balancer, r, is_best_bytraffic,
>
> &min_traffic);
>
> }
>
> @@ -107,9 +107,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10150)
>
> "mod_proxy must be loaded for mod_lbmethod_bytraffic");
>
> return !OK;
>
> Index: modules/proxy/mod_proxy.h
>
> ===================================================================
>
> --- modules/proxy/mod_proxy.h (revision 1836460)
>
> +++ modules/proxy/mod_proxy.h (working copy)
>
> @@ -883,7 +883,7 @@
>
> /*
>
> * Needed by the lb modules.
>
> */
>
> -APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_worker,
>
> +APR_DECLARE_OPTIONAL_FN(proxy_worker *, proxy_balancer_get_best_worker,
>
> (proxy_balancer *balancer,
>
> request_rec *r,
>
> proxy_is_best_callback_fn_t
> *is_best,
>
> Index: modules/proxy/proxy_util.c
>
> ===================================================================
>
> --- modules/proxy/proxy_util.c (revision 1836460)
>
> +++ modules/proxy/proxy_util.c (working copy)
>
> @@ -1415,6 +1415,13 @@
>
> return best_worker;
>
> }
>
> +static proxy_worker* proxy_balancer_get_best_worker(proxy_balancer *balancer,
>
> +
> request_rec *r,
>
> +
> proxy_is_best_callback_fn_t *is_best,
>
> + void *baton)
>
> +{
>
> + return ap_proxy_balancer_get_best_worker(balancer, r, is_best, baton);
>
> +}
>
> /*
>
> * CONNECTION related...
>
> */
>
> @@ -4079,5 +4086,5 @@
>
> {
>
> APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);
>
> APR_REGISTER_OPTIONAL_FN(ap_proxy_clear_connection);
>
> - APR_REGISTER_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
>
> + APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
>
> }
>
>
>
> *Von:*William A Rowe Jr <wrowe@rowe-clan.net <ma...@rowe-clan.net>>
> *Gesendet:* Montag, 23. Juli 2018 16:04
> *An:* httpd <dev@httpd.apache.org <ma...@httpd.apache.org>>
> *Betreff:* Re: Current trunk win build error
>
>
>
> Perhaps use proxy_balancer_get_best_worker, and don't export
>
> that? That can be the delegate for ap_proxy_balancer_get_best_worker.
>
>
>
> We either keep callbacks local, or export them _NONSTD. All the
>
> *_DECLARE (without _NONSTD) are not usable as apr/httpd
>
> callbacks.
>
>
>
>
>
> On Mon, Jul 23, 2018 at 7:22 AM, Plüm, Rüdiger, Vodafone Group
> <ruediger.pluem@vodafone.com <ma...@vodafone.com>> wrote:
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Apache Lounge <info@apachelounge.com
> <ma...@apachelounge.com>>
> > Gesendet: Montag, 23. Juli 2018 13:35
> > An: dev@httpd.apache.org <ma...@httpd.apache.org>
> > Betreff: Current trunk win build error
>
> >
> >
> >
> >
> >
> > Error C2440 'initializing': cannot convert from 'proxy_worker
> > *(__stdcall *)(proxy_balancer *,request_rec
> > *,proxy_is_best_callback_fn_t (__cdecl *),void *)' to
> > 'apr_OFN_ap_proxy_balancer_get_best_worker_t (__cdecl *)'
> >
> > mod_proxy c:\vc15\win32\httpd-trunk\modules\proxy\proxy_util.c 4082
> >
>
> Windows experts to the rescue please :-)
> Seems to be an issue between PROXY_DECLARE and the optional function
> stuff.
> Does the following patch fix it (just guessing)?
>
> Index: mod_proxy.h
> ===================================================================
> --- mod_proxy.h (revision 1836460)
> +++ mod_proxy.h (working copy)
> @@ -883,7 +883,7 @@
> /*
> * Needed by the lb modules.
> */
> -APR_DECLARE_OPTIONAL_FN(proxy_worker *,
> ap_proxy_balancer_get_best_worker,
> +APR_DECLARE_OPTIONAL_FN(PROXY_DECLARE(proxy_worker *),
> ap_proxy_balancer_get_best_worker,
> (proxy_balancer *balancer,
> request_rec *r,
> proxy_is_best_callback_fn_t
> *is_best,
>
>
>
> Regards
>
> Rüdiger
>
>
>
>
Michal Karm Babacek
--
Sent from my Hosaka Ono-Sendai Cyberspace 7
Re: Current trunk win build error
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
I think it's simply the attached (couldn't apply the inline text patch).
No need to change the hook name.
On Mon, Jul 23, 2018 at 9:16 AM, Plüm, Rüdiger, Vodafone Group <
ruediger.pluem@vodafone.com> wrote:
> So something like the below?
>
>
>
> Regards
>
>
>
> Rüdiger
>
>
>
> Index: modules/proxy/balancers/mod_lbmethod_bybusyness.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_bybusyness.c (revision
> 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_bybusyness.c (working copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_bybusyness_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_bybusyness(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -47,7 +47,7 @@
>
> {
>
> int total_factor = 0;
>
> proxy_worker *worker =
>
> - ap_proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bybusyness,
>
> + proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bybusyness,
>
> &total_factor);
>
> if (worker) {
>
> @@ -96,9 +96,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_
> worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_
> worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10151)
>
> "mod_proxy must be loaded for
> mod_lbmethod_bybusyness");
>
> return !OK;
>
> Index: modules/proxy/balancers/mod_lbmethod_byrequests.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_byrequests.c (revision
> 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_byrequests.c (working copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_byrequests_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_byrequests(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -84,7 +84,7 @@
>
> request_rec *r)
>
> {
>
> int total_factor = 0;
>
> - proxy_worker *worker = ap_proxy_balancer_get_best_worker_fn(balancer,
> r, is_best_byrequests, &total_factor);
>
> + proxy_worker *worker = proxy_balancer_get_best_worker_fn(balancer,
> r, is_best_byrequests, &total_factor);
>
> if (worker) {
>
> worker->s->lbstatus -= total_factor;
>
> @@ -137,9 +137,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_
> worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_
> worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10152)
>
> "mod_proxy must be loaded for
> mod_lbmethod_byrequests");
>
> return !OK;
>
> Index: modules/proxy/balancers/mod_lbmethod_bytraffic.c
>
> ===================================================================
>
> --- modules/proxy/balancers/mod_lbmethod_bytraffic.c
> (revision 1836460)
>
> +++ modules/proxy/balancers/mod_lbmethod_bytraffic.c (working
> copy)
>
> @@ -22,8 +22,8 @@
>
> module AP_MODULE_DECLARE_DATA lbmethod_bytraffic_module;
>
> -static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
>
> - *ap_proxy_balancer_get_best_worker_fn = NULL;
>
> +static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
>
> + *proxy_balancer_get_best_worker_fn = NULL;
>
> static int is_best_bytraffic(proxy_worker *current, proxy_worker
> *prev_best, void *baton)
>
> {
>
> @@ -62,7 +62,7 @@
>
> {
>
> apr_off_t min_traffic = 0;
>
> - return ap_proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bytraffic,
>
> + return proxy_balancer_get_best_worker_fn(balancer, r,
> is_best_bytraffic,
>
> &min_traffic);
>
> }
>
> @@ -107,9 +107,9 @@
>
> return OK;
>
> }
>
> - ap_proxy_balancer_get_best_worker_fn =
>
> - APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_
> worker);
>
> - if (!ap_proxy_balancer_get_best_worker_fn) {
>
> + proxy_balancer_get_best_worker_fn =
>
> + APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_
> worker);
>
> + if (!proxy_balancer_get_best_worker_fn) {
>
> ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10150)
>
> "mod_proxy must be loaded for
> mod_lbmethod_bytraffic");
>
> return !OK;
>
> Index: modules/proxy/mod_proxy.h
>
> ===================================================================
>
> --- modules/proxy/mod_proxy.h (revision 1836460)
>
> +++ modules/proxy/mod_proxy.h (working copy)
>
> @@ -883,7 +883,7 @@
>
> /*
>
> * Needed by the lb modules.
>
> */
>
> -APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_
> worker,
>
> +APR_DECLARE_OPTIONAL_FN(proxy_worker *, proxy_balancer_get_best_worker,
>
> (proxy_balancer *balancer,
>
> request_rec *r,
>
> proxy_is_best_callback_fn_t
> *is_best,
>
> Index: modules/proxy/proxy_util.c
>
> ===================================================================
>
> --- modules/proxy/proxy_util.c (revision 1836460)
>
> +++ modules/proxy/proxy_util.c (working copy)
>
> @@ -1415,6 +1415,13 @@
>
> return best_worker;
>
> }
>
> +static proxy_worker* proxy_balancer_get_best_worker(proxy_balancer
> *balancer,
>
> +
> request_rec *r,
>
> +
> proxy_is_best_callback_fn_t *is_best,
>
> + void
> *baton)
>
> +{
>
> + return ap_proxy_balancer_get_best_worker(balancer, r, is_best,
> baton);
>
> +}
>
> /*
>
> * CONNECTION related...
>
> */
>
> @@ -4079,5 +4086,5 @@
>
> {
>
> APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);
>
> APR_REGISTER_OPTIONAL_FN(ap_proxy_clear_connection);
>
> - APR_REGISTER_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
>
> + APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
>
> }
>
>
>
> *Von:* William A Rowe Jr <wr...@rowe-clan.net>
> *Gesendet:* Montag, 23. Juli 2018 16:04
> *An:* httpd <de...@httpd.apache.org>
> *Betreff:* Re: Current trunk win build error
>
>
>
> Perhaps use proxy_balancer_get_best_worker, and don't export
>
> that? That can be the delegate for ap_proxy_balancer_get_best_worker.
>
>
>
> We either keep callbacks local, or export them _NONSTD. All the
>
> *_DECLARE (without _NONSTD) are not usable as apr/httpd
>
> callbacks.
>
>
>
>
>
> On Mon, Jul 23, 2018 at 7:22 AM, Plüm, Rüdiger, Vodafone Group <
> ruediger.pluem@vodafone.com> wrote:
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Apache Lounge <in...@apachelounge.com>
> > Gesendet: Montag, 23. Juli 2018 13:35
> > An: dev@httpd.apache.org
> > Betreff: Current trunk win build error
>
> >
> >
> >
> >
> >
> > Error C2440 'initializing': cannot convert from 'proxy_worker
> > *(__stdcall *)(proxy_balancer *,request_rec
> > *,proxy_is_best_callback_fn_t (__cdecl *),void *)' to
> > 'apr_OFN_ap_proxy_balancer_get_best_worker_t (__cdecl *)'
> >
> > mod_proxy c:\vc15\win32\httpd-trunk\modules\proxy\proxy_util.c 4082
> >
>
> Windows experts to the rescue please :-)
> Seems to be an issue between PROXY_DECLARE and the optional function stuff.
> Does the following patch fix it (just guessing)?
>
> Index: mod_proxy.h
> ===================================================================
> --- mod_proxy.h (revision 1836460)
> +++ mod_proxy.h (working copy)
> @@ -883,7 +883,7 @@
> /*
> * Needed by the lb modules.
> */
> -APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_
> worker,
> +APR_DECLARE_OPTIONAL_FN(PROXY_DECLARE(proxy_worker *),
> ap_proxy_balancer_get_best_worker,
> (proxy_balancer *balancer,
> request_rec *r,
> proxy_is_best_callback_fn_t
> *is_best,
>
>
>
> Regards
>
> Rüdiger
>
>
>
AW: Current trunk win build error
Posted by Plüm,
Rüdiger,
Vodafone Group <ru...@vodafone.com>.
So something like the below?
Regards
Rüdiger
Index: modules/proxy/balancers/mod_lbmethod_bybusyness.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_bybusyness.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_bybusyness.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_bybusyness_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_bybusyness(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -47,7 +47,7 @@
{
int total_factor = 0;
proxy_worker *worker =
- ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_bybusyness,
+ proxy_balancer_get_best_worker_fn(balancer, r, is_best_bybusyness,
&total_factor);
if (worker) {
@@ -96,9 +96,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10151)
"mod_proxy must be loaded for mod_lbmethod_bybusyness");
return !OK;
Index: modules/proxy/balancers/mod_lbmethod_byrequests.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_byrequests.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_byrequests.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_byrequests_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_byrequests(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -84,7 +84,7 @@
request_rec *r)
{
int total_factor = 0;
- proxy_worker *worker = ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_byrequests, &total_factor);
+ proxy_worker *worker = proxy_balancer_get_best_worker_fn(balancer, r, is_best_byrequests, &total_factor);
if (worker) {
worker->s->lbstatus -= total_factor;
@@ -137,9 +137,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10152)
"mod_proxy must be loaded for mod_lbmethod_byrequests");
return !OK;
Index: modules/proxy/balancers/mod_lbmethod_bytraffic.c
===================================================================
--- modules/proxy/balancers/mod_lbmethod_bytraffic.c (revision 1836460)
+++ modules/proxy/balancers/mod_lbmethod_bytraffic.c (working copy)
@@ -22,8 +22,8 @@
module AP_MODULE_DECLARE_DATA lbmethod_bytraffic_module;
-static APR_OPTIONAL_FN_TYPE(ap_proxy_balancer_get_best_worker)
- *ap_proxy_balancer_get_best_worker_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(proxy_balancer_get_best_worker)
+ *proxy_balancer_get_best_worker_fn = NULL;
static int is_best_bytraffic(proxy_worker *current, proxy_worker *prev_best, void *baton)
{
@@ -62,7 +62,7 @@
{
apr_off_t min_traffic = 0;
- return ap_proxy_balancer_get_best_worker_fn(balancer, r, is_best_bytraffic,
+ return proxy_balancer_get_best_worker_fn(balancer, r, is_best_bytraffic,
&min_traffic);
}
@@ -107,9 +107,9 @@
return OK;
}
- ap_proxy_balancer_get_best_worker_fn =
- APR_RETRIEVE_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
- if (!ap_proxy_balancer_get_best_worker_fn) {
+ proxy_balancer_get_best_worker_fn =
+ APR_RETRIEVE_OPTIONAL_FN(proxy_balancer_get_best_worker);
+ if (!proxy_balancer_get_best_worker_fn) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10150)
"mod_proxy must be loaded for mod_lbmethod_bytraffic");
return !OK;
Index: modules/proxy/mod_proxy.h
===================================================================
--- modules/proxy/mod_proxy.h (revision 1836460)
+++ modules/proxy/mod_proxy.h (working copy)
@@ -883,7 +883,7 @@
/*
* Needed by the lb modules.
*/
-APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_worker,
+APR_DECLARE_OPTIONAL_FN(proxy_worker *, proxy_balancer_get_best_worker,
(proxy_balancer *balancer,
request_rec *r,
proxy_is_best_callback_fn_t *is_best,
Index: modules/proxy/proxy_util.c
===================================================================
--- modules/proxy/proxy_util.c (revision 1836460)
+++ modules/proxy/proxy_util.c (working copy)
@@ -1415,6 +1415,13 @@
return best_worker;
}
+static proxy_worker* proxy_balancer_get_best_worker(proxy_balancer *balancer,
+ request_rec *r,
+ proxy_is_best_callback_fn_t *is_best,
+ void *baton)
+{
+ return ap_proxy_balancer_get_best_worker(balancer, r, is_best, baton);
+}
/*
* CONNECTION related...
*/
@@ -4079,5 +4086,5 @@
{
APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);
APR_REGISTER_OPTIONAL_FN(ap_proxy_clear_connection);
- APR_REGISTER_OPTIONAL_FN(ap_proxy_balancer_get_best_worker);
+ APR_REGISTER_OPTIONAL_FN(proxy_balancer_get_best_worker);
}
Von: William A Rowe Jr <wr...@rowe-clan.net>
Gesendet: Montag, 23. Juli 2018 16:04
An: httpd <de...@httpd.apache.org>
Betreff: Re: Current trunk win build error
Perhaps use proxy_balancer_get_best_worker, and don't export
that? That can be the delegate for ap_proxy_balancer_get_best_worker.
We either keep callbacks local, or export them _NONSTD. All the
*_DECLARE (without _NONSTD) are not usable as apr/httpd
callbacks.
On Mon, Jul 23, 2018 at 7:22 AM, Plüm, Rüdiger, Vodafone Group <ru...@vodafone.com>> wrote:
> -----Ursprüngliche Nachricht-----
> Von: Apache Lounge <in...@apachelounge.com>>
> Gesendet: Montag, 23. Juli 2018 13:35
> An: dev@httpd.apache.org<ma...@httpd.apache.org>
> Betreff: Current trunk win build error
>
>
>
>
>
> Error C2440 'initializing': cannot convert from 'proxy_worker
> *(__stdcall *)(proxy_balancer *,request_rec
> *,proxy_is_best_callback_fn_t (__cdecl *),void *)' to
> 'apr_OFN_ap_proxy_balancer_get_best_worker_t (__cdecl *)'
>
> mod_proxy c:\vc15\win32\httpd-trunk\modules\proxy\proxy_util.c 4082
>
Windows experts to the rescue please :-)
Seems to be an issue between PROXY_DECLARE and the optional function stuff.
Does the following patch fix it (just guessing)?
Index: mod_proxy.h
===================================================================
--- mod_proxy.h (revision 1836460)
+++ mod_proxy.h (working copy)
@@ -883,7 +883,7 @@
/*
* Needed by the lb modules.
*/
-APR_DECLARE_OPTIONAL_FN(proxy_worker *, ap_proxy_balancer_get_best_worker,
+APR_DECLARE_OPTIONAL_FN(PROXY_DECLARE(proxy_worker *), ap_proxy_balancer_get_best_worker,
(proxy_balancer *balancer,
request_rec *r,
proxy_is_best_callback_fn_t *is_best,
Regards
Rüdiger