GOMEZ Henri wrote:
> 
> >> How could one write a wrapper for the following?:
> >> +++
> >> -int jk_open_socket(struct sockaddr_in *addr,
> >> +apr_status_t jk_open_socket(apr_socket_t **new,
> >apr_sockaddr_t *addr,
> >>                     int ndelay,
> >> -                   jk_logger_t *l)
> >> +                   jk_logger_t *l, apr_pool_t *cont)
> >
> >> +++
> >> jk_open_socket is in jk_connect.c and the above is a diff of
> >"APRized" and
> >> actual jk_open_socket().
> >> Well I am just trying to show I cannot see how to write a
> >wrapper for that...
> >
> >One solution ( the simpler ) is to implement jk_open_socket by using a
> >call to apr_open_socket. Then with a bit of #ifdef magic you can either
> >include the apr-based impl or the existing code, no change in existing
> >code. When APR is stable and if everything works fine on all
> >platform/servers - we can replace calls to jk_open_socket with calls to
> >apr_open_socket.
> 
> +1 on that wrapping. I want to have wrapper not because I feel APR
> broken but because I don't want to broke mod_jk rigth now.
> The large majority of Apache sites still use Apache 1.3 and
> having Apache 1.3 + APR + thread could be a nigthmare, but when
> playing with Apache 2.0, where APR is allready in, it will be a
> great choice !!!!!
> 
> >Another solution - change jk_open_socket signature to match that of
> >apr_open_socket, and use a simple
> >#ifdef APR
> >#define jk_open_socket apr_open_socket
> >( and all the other ). When APR is stable, do a simple replace jk_ with
> >apr_.
> 
> Even more elegant.

Yes, but jk_open_socket would have to be modified:
1 - to pass a apr_pool to allocate the apr_connect.
2 - to return a status instead a socket.

Some structures have to be changed like struct ajp_endpoint for example:
int sd; should be
jk_socket_t sd;
Where jk_socket_t is a int when no APR and apr_socket_t * with APR.
My idea is to use this mechanism eveywhere.

> 
> >IMHO both will be a waste of time as long as we don't have
> >solutions for
> >the real problems ( form based login, welcome files, etc).
> 
> I think some commiters like JF Clere will be pleased to works
> on APR port to mod_jk and may be a great help here ;)

Of  course - But I need time -

> 
> I and others (costin, kevin, andy, mike) could still works on
> core business ....
> 

By the way the topic has nothing to do with what we are speaking about now ;-)

Reply via email to