mreynolds / 389-ds-base

Forked from 389-ds-base 6 years ago
Clone

b41338f Bug 689952 - (cov#10581) Incorrect bit check in replication connection code

Authored and Committed by nkinder 13 years ago
    Bug 689952 - (cov#10581) Incorrect bit check in replication connection code
    
    In the replication connection code, we do a bit check that is incorrect.
    We currently have this in repl5_connection.c at line 540:
    
      } else if ((rc < 0) || ((polldesc.out_flags|PR_POLL_WRITE) == 0)) {
          slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
          ...
    
    The problem is that "((polldesc.out_flags|PR_POLL_WRITE) == 0))" will
    always be false since PR_POLL_WRITE is defined as 2.  We should be using
    the following condition instead to check if out_flags does not have
    PR_POLL_WRITE set:
    
      (!(polldesc.out_flags&PR_POLL_WRITE))