Print

Print


When reaching a redirect limit, the status object provided will not have errno set (defaulting to 0).

Processing the errno of this status object can lead to confusion, as an error is encountered (`!status.IsOk()` gives true) but the `errno` is 0.

The case I've identified happened in the following code section (XrdClXrootDMsgHandler.cc:493):
```cpp
        if( !pRedirectCounter )
        {
          log->Warning( XRootDMsg, "[%s] Redirect limit has been reached for "
                     "message %s, the last known error is: %s",
                     pUrl.GetHostId().c_str(),
                     pRequest->GetDescription().c_str(),
                     pLastError.ToString().c_str() );


          pStatus = Status( stFatal, errRedirectLimit );
          HandleResponse();
          return;
        }
```

At this point, the value of the last known error status is still available.
Should the new status object have its `errno` set from the last known error object?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/1031

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1