On Fri, Jun 2, 2017 at 7:44 PM,  <wr...@apache.org> wrote:
> Author: wrowe
> Date: Fri Jun  2 17:44:41 2017
> New Revision: 1797413
>
> URL: http://svn.apache.org/viewvc?rev=1797413&view=rev
> Log:
> Revert to 1.5.x apr_os_proc_mutex_get() behavior on Netware with an additional
> guard against dereferencing a NULL pointer. The assignment appears to be a 
> noop
> but avoiding changes in this logic from 1.5.x -> 1.6.x is the primary goal.
[]
> ==============================================================================
> --- apr/apr/branches/1.6.x/locks/netware/proc_mutex.c (original)
> +++ apr/apr/branches/1.6.x/locks/netware/proc_mutex.c Fri Jun  2 17:44:41 2017
> @@ -116,9 +116,9 @@ APR_DECLARE(apr_status_t) apr_os_proc_mu
>                                                     apr_proc_mutex_t *pmutex,
>                                                     apr_lockmech_e *mech)
>  {
> -    if (!pmutex->mutex) {
> -        return APR_ENOLOCK;
> -    }
> +    if (pmutex && pmutex->mutex)
> +        ospmutex = pmutex->mutex->mutex;
> +    return APR_ENOLOCK;

Hmm, do you mean Netware users are doomed to get ENOLOCK whaever happens?
I don't see the issue without this change, the change was somehow a
bugfix imo...

>  #if 0
>      /* We need to change apr_os_proc_mutex_t to a pointer type
>       * to be able to implement this function.
> @@ -127,12 +127,8 @@ APR_DECLARE(apr_status_t) apr_os_proc_mu
>      if (mech) {
>          *mech = APR_LOCK_DEFAULT;
>      }
> -#else
> -    if (mech) {
> -        *mech = APR_LOCK_DEFAULT;
> -    }
> -#endif
>      return APR_SUCCESS;
> +#endif
>  }

Reply via email to